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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Wed Apr 22 20:17:11 UTC 2009


Author: nekral-guest
Date: 2009-04-22 20:17:11 +0000 (Wed, 22 Apr 2009)
New Revision: 2746

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/login.c
Log:
	* src/login.c: Ignore the return value of puts(), fputs(),
	strftime().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-22 20:15:21 UTC (rev 2745)
+++ upstream/trunk/ChangeLog	2009-04-22 20:17:11 UTC (rev 2746)
@@ -1,5 +1,10 @@
 2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/login.c: Ignore the return value of puts(), fputs(),
+	strftime().
+
+2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/login.c: timeout, delay, and retries should be unsigned.
 	* src/login.c: Ignore the return value of alarm() and sleep().
 

Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c	2009-04-22 20:15:21 UTC (rev 2745)
+++ upstream/trunk/src/login.c	2009-04-22 20:17:11 UTC (rev 2746)
@@ -269,7 +269,7 @@
 			closelog ();
 			exit (0);
 		}
-		puts (_("\n[Disconnect bypassed -- root login allowed.]"));
+		(void) puts (_("\n[Disconnect bypassed -- root login allowed.]"));
 	}
 }
 #endif				/* !USE_PAM */
@@ -794,7 +794,7 @@
 				exit(0);
 			} else if (retcode == PAM_ABORT) {
 				/* Serious problems, quit now */
-				fputs (_("login: abort requested by PAM\n"),stderr);
+				(void) fputs (_("login: abort requested by PAM\n"), stderr);
 				SYSLOG ((LOG_ERR,"PAM_ABORT returned from pam_authenticate()"));
 				PAM_END;
 				exit(99);
@@ -1068,7 +1068,7 @@
 			(void) sleep (delay);
 		}
 
-		puts (_("Login incorrect"));
+		(void) puts (_("Login incorrect"));
 
 		/* allow only one attempt with -r or -f */
 		if (rflg || fflg || (retries <= 0)) {
@@ -1256,7 +1256,7 @@
 			/* Reset the lockout times if logged in */
 			if (   (0 != faillog.fail_max)
 			    && (faillog.fail_cnt >= faillog.fail_max)) {
-				puts (_("Warning: login re-enabled after temporary lockout."));
+				(void) puts (_("Warning: login re-enabled after temporary lockout."));
 				SYSLOG ((LOG_WARN,
 				         "login '%s' re-enabled after temporary lockout (%d failures)",
 				         username, (int) faillog.fail_cnt));
@@ -1267,9 +1267,9 @@
 			time_t ll_time = ll.ll_time;
 
 #ifdef HAVE_STRFTIME
-			strftime (ptime, sizeof (ptime),
-			          "%a %b %e %H:%M:%S %z %Y",
-			          localtime (&ll_time));
+			(void) strftime (ptime, sizeof (ptime),
+			                 "%a %b %e %H:%M:%S %z %Y",
+			                 localtime (&ll_time));
 			printf (_("Last login: %s on %s"),
 			        ptime, ll.ll_line);
 #else




More information about the Pkg-shadow-commits mailing list