← Commit list

50ead33c4

Denys Vlasenko
Denys Vlasenko
2020-12-02
SUCCESS Duration: 151s

Subject

login: log to syslog every bad password, not only 3rd

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/login.c+2 -4
@@ -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';