]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure.ac: be deterministic about passwd location
authorChris Hofstaedtler <zeha@debian.org>
Mon, 24 Feb 2025 21:50:01 +0000 (22:50 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sun, 2 Mar 2025 06:59:56 +0000 (07:59 +0100)
Statically set PASSWD_PROGRAM depending on exec_prefix, and not by where
the passwd program was at configure time.

Depending on the specific build situation before, this may or may not
change the embedded passwd program path. Also configure.ac sets
exec_prefix=/ for prefix=/usr, so this might be a bit confusing, but
at least deterministic.

Closes: #1224
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
configure.ac

index 403f3abc7e52c914171c165ee47d9bdc0b74db4f..d5e902906d54ede76b4e576926d20446d3324b57 100644 (file)
@@ -103,13 +103,7 @@ AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$shadow_cv_logdir/lastlog",
 AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$shadow_cv_logdir/faillog",
        [Path for faillog file.])
 
-AC_CACHE_CHECK([location of the passwd program], shadow_cv_passwd_dir,
-[if test -f /usr/bin/passwd; then
-       shadow_cv_passwd_dir=/usr/bin
-else
-       shadow_cv_passwd_dir=/bin
-fi])
-AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
+AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$exec_prefix/bin/passwd",
        [Path to passwd program.])
 
 AC_ARG_ENABLE(shadowgrp,