[Pkg-shadow-commits] r3549 - in upstream/trunk: . src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sun Nov 6 18:38:52 UTC 2011


Author: nekral-guest
Date: 2011-11-06 18:38:51 +0000 (Sun, 06 Nov 2011)
New Revision: 3549

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/login.c
Log:
	* src/login.c: re-indent.
	* src/login.c: Fix support for sub-logins.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-11-06 18:38:45 UTC (rev 3548)
+++ upstream/trunk/ChangeLog	2011-11-06 18:38:51 UTC (rev 3549)
@@ -1,5 +1,10 @@
 2011-10-30  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/login.c: re-indent.
+	* src/login.c: Fix support for sub-logins.
+
+2011-10-30  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt
 	index of long options is not used.
 

Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c	2011-11-06 18:38:45 UTC (rev 3548)
+++ upstream/trunk/src/login.c	2011-11-06 18:38:51 UTC (rev 3549)
@@ -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 @@
 				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 @@
 				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 @@
 	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);
 	}
 




More information about the Pkg-shadow-commits mailing list