* configure.in, src/login.c: Do not use HAVE_PAM_FAIL_DELAY, but

HAS_PAM_FAIL_DELAY, to avoid a redefinition with Linux PAM.
This commit is contained in:
nekral-guest 2008-08-31 17:27:16 +00:00
parent 978b3ef881
commit cd6a300222
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,8 @@
2008-08-28 Nicolas François <nicolas.francois@centraliens.net>
* configure.in: Indentation fix.
* configure.in, src/login.c: Do not use HAVE_PAM_FAIL_DELAY, but
HAS_PAM_FAIL_DELAY, to avoid a redefinition with Linux PAM.
2008-08-27 Nicolas François <nicolas.francois@centraliens.net>

View File

@ -389,8 +389,10 @@ if test "$with_libpam" = "yes"; then
save_libs=$LIBS
LIBS="$LIBS $LIBPAM"
AC_CHECK_FUNCS([pam_fail_delay])
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])

View File

@ -645,7 +645,7 @@ int main (int argc, char **argv)
PAM_FAIL_CHECK;
retcode = pam_set_item (pamh, PAM_TTY, tty);
PAM_FAIL_CHECK;
#ifdef HAVE_PAM_FAIL_DELAY
#ifdef HAS_PAM_FAIL_DELAY
retcode = pam_fail_delay (pamh, 1000000 * delay);
PAM_FAIL_CHECK;
#endif
@ -691,7 +691,7 @@ int main (int argc, char **argv)
failed = false;
failcount++;
#ifdef HAVE_PAM_FAIL_DELAY
#ifdef HAS_PAM_FAIL_DELAY
if (delay > 0) {
retcode = pam_fail_delay(pamh, 1000000*delay);
}