* src/login.c: failcount does not need to be signed.
This commit is contained in:
parent
538336a332
commit
b60e8b6b45
@ -1,3 +1,7 @@
|
|||||||
|
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/login.c: failcount does not need to be signed.
|
||||||
|
|
||||||
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/Makefile.am: PAM enabled chpasswd now needs to be linked to
|
* src/Makefile.am: PAM enabled chpasswd now needs to be linked to
|
||||||
|
12
src/login.c
12
src/login.c
@ -738,7 +738,7 @@ int main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
/* if fflg, then the user has already been authenticated */
|
/* if fflg, then the user has already been authenticated */
|
||||||
if (!fflg) {
|
if (!fflg) {
|
||||||
int failcount = 0;
|
unsigned int failcount = 0;
|
||||||
char hostn[256];
|
char hostn[256];
|
||||||
char loginprompt[256]; /* That's one hell of a prompt :) */
|
char loginprompt[256]; /* That's one hell of a prompt :) */
|
||||||
|
|
||||||
@ -790,10 +790,10 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
if (retcode == PAM_MAXTRIES) {
|
if (retcode == PAM_MAXTRIES) {
|
||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
|
||||||
failcount, fromhost, failent_user));
|
failcount, fromhost, failent_user));
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("Maximum number of tries exceeded (%d)\n"),
|
_("Maximum number of tries exceeded (%u)\n"),
|
||||||
failcount);
|
failcount);
|
||||||
PAM_END;
|
PAM_END;
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -804,7 +804,7 @@ int main (int argc, char **argv)
|
|||||||
PAM_END;
|
PAM_END;
|
||||||
exit(99);
|
exit(99);
|
||||||
} else if (retcode != PAM_SUCCESS) {
|
} else if (retcode != PAM_SUCCESS) {
|
||||||
SYSLOG ((LOG_NOTICE,"FAILED LOGIN (%d)%s FOR '%s', %s",
|
SYSLOG ((LOG_NOTICE,"FAILED LOGIN (%u)%s FOR '%s', %s",
|
||||||
failcount, fromhost, failent_user,
|
failcount, fromhost, failent_user,
|
||||||
pam_strerror (pamh, retcode)));
|
pam_strerror (pamh, retcode)));
|
||||||
failed = true;
|
failed = true;
|
||||||
@ -834,10 +834,10 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
if (failcount >= retries) {
|
if (failcount >= retries) {
|
||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
|
||||||
failcount, fromhost, failent_user));
|
failcount, fromhost, failent_user));
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("Maximum number of tries exceeded (%d)\n"),
|
_("Maximum number of tries exceeded (%u)\n"),
|
||||||
failcount);
|
failcount);
|
||||||
PAM_END;
|
PAM_END;
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user