]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure.ac: remove redundant check for pam_fail_delay
authorMike Gilbert <floppym@gentoo.org>
Mon, 16 Feb 2026 21:01:18 +0000 (16:01 -0500)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 16 Feb 2026 23:25:59 +0000 (00:25 +0100)
This check was introduced in 276e406c (support for OpenPAM).
OpenPAM has never declared pam_fail_delay.

linux-pam has defined HAVE_PAM_FAIL_DELAY in its headers for a very long
time (before version history).

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
configure.ac
src/login.c

index d1705ac25f52cad8492340525316fc49eaccf441..a5030b028cd671b0aa705f8e8a8a882bd571ae33 100644 (file)
@@ -548,13 +548,6 @@ if test "X$with_libpam" = "Xyes"; then
                       [], [], [[#include <security/pam_appl.h>]])
 
 
-       save_libs=$LIBS
-       LIBS="$LIBS $LIBPAM"
-       # We do not use AC_CHECK_FUNCS to avoid duplicated definition with
-       # Linux PAM.
-       AC_CHECK_FUNC([pam_fail_delay], [AC_DEFINE([HAS_PAM_FAIL_DELAY], [1], [Define to 1 if you have the declaration of 'pam_fail_delay'])])
-       LIBS=$save_libs
-
        AC_DEFINE([USE_PAM], [1], [Define to support Pluggable Authentication Modules])
        AC_DEFINE_UNQUOTED([SHADOW_PAM_CONVERSATION], [$pam_conv_function],[PAM conversation to use])
 
index 2af11b47772420f66406a9c77f43c5f48dfc4635..f5543796f30db2cf4f9dd9abb5e997d49c6305d3 100644 (file)
@@ -634,7 +634,7 @@ int main (int argc, char **argv)
        PAM_FAIL_CHECK;
        retcode = pam_set_item (pamh, PAM_TTY, tty);
        PAM_FAIL_CHECK;
-#ifdef HAS_PAM_FAIL_DELAY
+#ifdef HAVE_PAM_FAIL_DELAY
        retcode = pam_fail_delay (pamh, 1000000 * delay);
        PAM_FAIL_CHECK;
 #endif
@@ -675,7 +675,7 @@ int main (int argc, char **argv)
                        bool failed = false;
 
                        failcount++;
-#ifdef HAS_PAM_FAIL_DELAY
+#ifdef HAVE_PAM_FAIL_DELAY
                        if (delay > 0) {
                                retcode = pam_fail_delay(pamh, 1000000*delay);
                                PAM_FAIL_CHECK;