+2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
+
+ * src/login.c: Fix the count of failures before login exits in
+ case of PAM enabled configurations.
+
2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
* man/passwd.1.xml: Document that passwd uses PAM to authenticate
failent_user = "UNKNOWN";
}
- if (retcode == PAM_MAXTRIES || failcount >= retries) {
+ if (retcode == PAM_MAXTRIES) {
SYSLOG ((LOG_NOTICE,
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
failcount, fromhost, failent_user));
fprintf (stderr, "\nLogin incorrect\n");
+ if (failcount >= retries) {
+ SYSLOG ((LOG_NOTICE,
+ "TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
+ failcount, fromhost, failent_user));
+ fprintf(stderr,
+ _("Maximum number of tries exceeded (%d)\n"),
+ failcount);
+ PAM_END;
+ exit(0);
+ }
+
/*
* Let's give it another go around.
* Even if a username was given on the command