1 diff -urpa shadow-4.15.1.orig/lib/getdef.c shadow-4.15.1/lib/getdef.c
2 --- shadow-4.15.1.orig/lib/getdef.c 2024-03-23 21:32:25.000000000 +0100
3 +++ shadow-4.15.1/lib/getdef.c 2024-04-02 13:16:27.781730965 +0200
4 @@ -83,7 +83,6 @@ static struct itemdef def_table[] = {
8 - {"FAIL_DELAY", NULL},
12 diff -urpa shadow-4.15.1.orig/src/login.c shadow-4.15.1/src/login.c
13 --- shadow-4.15.1.orig/src/login.c 2024-03-24 00:33:29.000000000 +0100
14 +++ shadow-4.15.1/src/login.c 2024-04-02 13:17:10.550309495 +0200
15 @@ -489,7 +489,6 @@ int main (int argc, char **argv)
22 struct passwd *pwd = NULL;
23 @@ -500,6 +499,7 @@ int main (int argc, char **argv)
28 struct spwd *spwd = NULL;
29 # if defined(ENABLE_LASTLOG)
31 @@ -667,7 +667,6 @@ int main (int argc, char **argv)
34 environ = newenvp; /* make new environment active */
35 - delay = getdef_unum ("FAIL_DELAY", 1);
36 retries = getdef_unum ("LOGIN_RETRIES", RETRIES);
39 @@ -683,8 +682,7 @@ int main (int argc, char **argv)
42 * hostname & tty are either set to NULL or their correct values,
43 - * depending on how much we know. We also set PAM's fail delay to
45 + * depending on how much we know.
47 * PAM_RHOST and PAM_TTY are used for authentication, only use
48 * information coming from login or from the caller (e.g. no utmp)
49 @@ -693,10 +691,6 @@ int main (int argc, char **argv)
51 retcode = pam_set_item (pamh, PAM_TTY, tty);
53 -#ifdef HAS_PAM_FAIL_DELAY
54 - retcode = pam_fail_delay (pamh, 1000000 * delay);
57 /* if fflg, then the user has already been authenticated */
60 @@ -734,12 +728,6 @@ int main (int argc, char **argv)
64 -#ifdef HAS_PAM_FAIL_DELAY
66 - retcode = pam_fail_delay(pamh, 1000000*delay);
71 retcode = pam_authenticate (pamh, 0);
73 @@ -1029,14 +1017,17 @@ int main (int argc, char **argv)
79 * Wait a while (a la SVR4 /usr/bin/login) before attempting
80 * to login the user again. If the earlier alarm occurs
81 * before the sleep() below completes, login will exit.
83 + delay = getdef_unum ("FAIL_DELAY", 1);
89 (void) puts (_("Login incorrect"));