* src/login.c: Fix the count of failures before login exits in
case of PAM enabled configurations.
This commit is contained in:
parent
bc0f4fa509
commit
64a9f33ffa
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* man/passwd.1.xml: Document that passwd uses PAM to authenticate
|
* man/passwd.1.xml: Document that passwd uses PAM to authenticate
|
||||||
|
13
src/login.c
13
src/login.c
@ -726,7 +726,7 @@ int main (int argc, char **argv)
|
|||||||
failent_user = "UNKNOWN";
|
failent_user = "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retcode == PAM_MAXTRIES || failcount >= retries) {
|
if (retcode == PAM_MAXTRIES) {
|
||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
||||||
failcount, fromhost, failent_user));
|
failcount, fromhost, failent_user));
|
||||||
@ -769,6 +769,17 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
fprintf (stderr, "\nLogin incorrect\n");
|
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.
|
* Let's give it another go around.
|
||||||
* Even if a username was given on the command
|
* Even if a username was given on the command
|
||||||
|
Loading…
Reference in New Issue
Block a user