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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sat May 9 13:14:50 UTC 2009


Author: nekral-guest
Date: 2009-05-09 13:14:50 +0000 (Sat, 09 May 2009)
New Revision: 2866

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/login.c
Log:
	* src/login.c: failcount does not need to be signed.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-05-09 13:14:44 UTC (rev 2865)
+++ upstream/trunk/ChangeLog	2009-05-09 13:14:50 UTC (rev 2866)
@@ -1,5 +1,9 @@
 2009-05-07  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/login.c: failcount does not need to be signed.
+
+2009-05-07  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/Makefile.am: PAM enabled chpasswd now needs to be linked to
 	the PAM library, even if --enable-account-tools-setuid is not
 	used.

Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c	2009-05-09 13:14:44 UTC (rev 2865)
+++ upstream/trunk/src/login.c	2009-05-09 13:14:50 UTC (rev 2866)
@@ -738,7 +738,7 @@
 #endif
 	/* if fflg, then the user has already been authenticated */
 	if (!fflg) {
-		int failcount = 0;
+		unsigned int failcount = 0;
 		char hostn[256];
 		char loginprompt[256];	/* That's one hell of a prompt :) */
 
@@ -790,10 +790,10 @@
 
 			if (retcode == PAM_MAXTRIES) {
 				SYSLOG ((LOG_NOTICE,
-				         "TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
+				         "TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
 				         failcount, fromhost, failent_user));
 				fprintf(stderr,
-				        _("Maximum number of tries exceeded (%d)\n"),
+				        _("Maximum number of tries exceeded (%u)\n"),
 				        failcount);
 				PAM_END;
 				exit(0);
@@ -804,7 +804,7 @@
 				PAM_END;
 				exit(99);
 			} 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,
 				         pam_strerror (pamh, retcode)));
 				failed = true;
@@ -834,10 +834,10 @@
 
 			if (failcount >= retries) {
 				SYSLOG ((LOG_NOTICE,
-				         "TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
+				         "TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
 				         failcount, fromhost, failent_user));
 				fprintf(stderr,
-				        _("Maximum number of tries exceeded (%d)\n"),
+				        _("Maximum number of tries exceeded (%u)\n"),
 				        failcount);
 				PAM_END;
 				exit(0);




More information about the Pkg-shadow-commits mailing list