diff options
author | Denys Vlasenko | 2020-12-02 17:47:16 +0100 |
---|---|---|
committer | Denys Vlasenko | 2020-12-02 17:47:16 +0100 |
commit | 50ead33c45919abffde35313daac4c2dfd8641ca (patch) | |
tree | b6936d263cb9657d508a7f3db87e30536c00eddb | |
parent | 6599e380ed5e1b1272a5e0e26183471d8b4b2051 (diff) | |
download | busybox-50ead33c45919abffde35313daac4c2dfd8641ca.zip busybox-50ead33c45919abffde35313daac4c2dfd8641ca.tar.gz |
login: log to syslog every bad password, not only 3rd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | loginutils/login.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index c3a8351..f0bce50 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'; |