* src/login.c: re-indent.
* src/login.c: Fix support for sub-logins.
This commit is contained in:
parent
6eb0500d3d
commit
d15f2c6214
@ -1,3 +1,8 @@
|
|||||||
|
2011-10-30 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/login.c: re-indent.
|
||||||
|
* src/login.c: Fix support for sub-logins.
|
||||||
|
|
||||||
2011-10-30 Nicolas François <nicolas.francois@centraliens.net>
|
2011-10-30 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt
|
* src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt
|
||||||
|
19
src/login.c
19
src/login.c
@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 1989 - 1994, Julianne Frances Haugh
|
* Copyright (c) 1989 - 1994, Julianne Frances Haugh
|
||||||
* Copyright (c) 1996 - 2001, Marek Michałkiewicz
|
* Copyright (c) 1996 - 2001, Marek Michałkiewicz
|
||||||
* Copyright (c) 2001 - 2006, Tomasz Kłoczko
|
* Copyright (c) 2001 - 2006, Tomasz Kłoczko
|
||||||
* Copyright (c) 2007 - 2010, Nicolas François
|
* Copyright (c) 2007 - 2011, Nicolas François
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -795,9 +795,9 @@ int main (int argc, char **argv)
|
|||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%u)%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 (%u)\n"),
|
_("Maximum number of tries exceeded (%u)\n"),
|
||||||
failcount);
|
failcount);
|
||||||
PAM_END;
|
PAM_END;
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (retcode == PAM_ABORT) {
|
} else if (retcode == PAM_ABORT) {
|
||||||
@ -839,9 +839,9 @@ int main (int argc, char **argv)
|
|||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%u)%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 (%u)\n"),
|
_("Maximum number of tries exceeded (%u)\n"),
|
||||||
failcount);
|
failcount);
|
||||||
PAM_END;
|
PAM_END;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@ -881,12 +881,15 @@ int main (int argc, char **argv)
|
|||||||
if (NULL != username) {
|
if (NULL != username) {
|
||||||
free (username);
|
free (username);
|
||||||
}
|
}
|
||||||
username = pam_user;
|
username = xstrdup (pam_user);
|
||||||
failent_user = get_failent_user (username);
|
failent_user = get_failent_user (username);
|
||||||
|
|
||||||
pwd = xgetpwnam (username);
|
pwd = xgetpwnam (username);
|
||||||
if (NULL == pwd) {
|
if (NULL == pwd) {
|
||||||
SYSLOG ((LOG_ERR, "cannot find user %s", failent_user));
|
SYSLOG ((LOG_ERR, "cannot find user %s", failent_user));
|
||||||
|
fprintf (stderr,
|
||||||
|
_("Cannot find user (%s)\n"),
|
||||||
|
username);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user