login: log to syslog every bad password, not only 3rd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6599e380ed
commit
50ead33c45
@ -508,13 +508,11 @@ int login_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
pause_after_failed_login();
|
pause_after_failed_login();
|
||||||
/* TODO: doesn't sound like correct English phrase to me */
|
/* TODO: doesn't sound like correct English phrase to me */
|
||||||
puts("Login incorrect");
|
puts("Login incorrect");
|
||||||
if (++count == 3) {
|
|
||||||
syslog(LOG_WARNING, "invalid password for '%s'%s",
|
syslog(LOG_WARNING, "invalid password for '%s'%s",
|
||||||
username, fromhost);
|
username, fromhost);
|
||||||
|
if (++count == 3) {
|
||||||
if (ENABLE_FEATURE_CLEAN_UP)
|
if (ENABLE_FEATURE_CLEAN_UP)
|
||||||
free(fromhost);
|
free(fromhost);
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
username[0] = '\0';
|
username[0] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user