]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login: use FAIL_DELAY from login.defs
authorKarel Zak <kzak@redhat.com>
Wed, 5 Oct 2011 11:41:40 +0000 (13:41 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 26 Oct 2011 21:17:17 +0000 (23:17 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/login.1
login-utils/login.c

index ef71539c4a2eb32399446d9239aa53874ab6cdc4..8cb245009817aaf31445df8f01329b38ba4e6eb9 100644 (file)
@@ -138,7 +138,12 @@ PAM module.
 .RS 4
 Max time in seconds for login. The default value is 60.
 .RE
-
+.PP
+\fBFAIL_DELAY\fR (number)
+.RS 4
+Delay in seconds before being allowed another attempt after a login failure.
+The default value is 5.
+.RE
 .SH FILES
 .nf
 .I /var/run/utmp
index eece2e4f982a2879dfbce3803421557160861b60..e95c5d6d4108d60da1c23b899fea2b811dee4765 100644 (file)
@@ -176,7 +176,7 @@ static void sig_handler(int signal)
 /* Should not be called from PAM code... */
 static void sleepexit(int eval)
 {
-       sleep(LOGIN_EXIT_TIMEOUT);
+       sleep(getlogindefs_num("FAIL_DELAY", LOGIN_EXIT_TIMEOUT));
        exit(eval);
 }