aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2020-12-02 17:47:16 +0100
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2020-12-02 17:47:16 +0100
commit50ead33c45919abffde35313daac4c2dfd8641ca (patch)
treeb6936d263cb9657d508a7f3db87e30536c00eddb /loginutils
parent6599e380ed5e1b1272a5e0e26183471d8b4b2051 (diff)
downloadbusybox-50ead33c45919abffde35313daac4c2dfd8641ca.tar.gz
busybox-50ead33c45919abffde35313daac4c2dfd8641ca.tar.bz2
login: log to syslog every bad password, not only 3rd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index c3a835180..f0bce50ce 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -508,13 +508,11 @@ int login_main(int argc UNUSED_PARAM, char **argv)
pause_after_failed_login();
/* TODO: doesn't sound like correct English phrase to me */
puts("Login incorrect");
+ syslog(LOG_WARNING, "invalid password for '%s'%s",
+ username, fromhost);
if (++count == 3) {
- syslog(LOG_WARNING, "invalid password for '%s'%s",
- username, fromhost);
-
if (ENABLE_FEATURE_CLEAN_UP)
free(fromhost);
-
return EXIT_FAILURE;
}
username[0] = '\0';