+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
* 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
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) {
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);
}
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);
}