* src/login.c: re-indent.

* src/login.c: Fix support for sub-logins.
This commit is contained in:
nekral-guest 2011-11-06 18:38:51 +00:00
parent 6eb0500d3d
commit d15f2c6214
2 changed files with 16 additions and 8 deletions

View File

@ -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>
* src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt

View File

@ -2,7 +2,7 @@
* Copyright (c) 1989 - 1994, Julianne Frances Haugh
* Copyright (c) 1996 - 2001, Marek Michałkiewicz
* Copyright (c) 2001 - 2006, Tomasz Kłoczko
* Copyright (c) 2007 - 2010, Nicolas François
* Copyright (c) 2007 - 2011, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -795,9 +795,9 @@ int main (int argc, char **argv)
SYSLOG ((LOG_NOTICE,
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
failcount, fromhost, failent_user));
fprintf(stderr,
_("Maximum number of tries exceeded (%u)\n"),
failcount);
fprintf (stderr,
_("Maximum number of tries exceeded (%u)\n"),
failcount);
PAM_END;
exit(0);
} else if (retcode == PAM_ABORT) {
@ -839,9 +839,9 @@ int main (int argc, char **argv)
SYSLOG ((LOG_NOTICE,
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
failcount, fromhost, failent_user));
fprintf(stderr,
_("Maximum number of tries exceeded (%u)\n"),
failcount);
fprintf (stderr,
_("Maximum number of tries exceeded (%u)\n"),
failcount);
PAM_END;
exit(0);
}
@ -881,12 +881,15 @@ int main (int argc, char **argv)
if (NULL != username) {
free (username);
}
username = pam_user;
username = xstrdup (pam_user);
failent_user = get_failent_user (username);
pwd = xgetpwnam (username);
if (NULL == pwd) {
SYSLOG ((LOG_ERR, "cannot find user %s", failent_user));
fprintf (stderr,
_("Cannot find user (%s)\n"),
username);
exit (1);
}