summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@openwide.fr>2014-03-16 10:18:19 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2014-03-16 10:18:19 (GMT)
commit0e3334c8d8f021ed87d873ac95e165cde9da5e4d (patch)
tree6f918d0aac40a79d20e027fefeb0c80f8f20aed1
parentac03a40cbac4545909b6529d358c253f8a6d3b45 (diff)
downloadbusybox-0e3334c8d8f021ed87d873ac95e165cde9da5e4d.tar.gz
busybox-0e3334c8d8f021ed87d873ac95e165cde9da5e4d.tar.bz2
su: add a delay if the password is incorrect
Signed-off-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--loginutils/su.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/loginutils/su.c b/loginutils/su.c
index c51f26f..f812505 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -101,6 +101,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
if (ENABLE_FEATURE_SU_SYSLOG)
syslog(LOG_NOTICE, "%c %s %s:%s",
'-', tty, old_user, opt_username);
+ bb_do_delay(LOGIN_FAIL_DELAY);
bb_error_msg_and_die("incorrect password");
}