]> granicus.if.org Git - shadow/commitdiff
* src/login.c: Ignore the return value of puts(), fputs(),
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 22 Apr 2009 20:17:11 +0000 (20:17 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 22 Apr 2009 20:17:11 +0000 (20:17 +0000)
strftime().

ChangeLog
src/login.c

index 99879cf26bb08cecb7be5380841ea68548033362..10830f472179e87e8d5db32710209b4329cbe1e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-22  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/login.c: Ignore the return value of puts(), fputs(),
+       strftime().
+
 2009-04-22  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/login.c: timeout, delay, and retries should be unsigned.
index 29de519c61d4c8ce335bb13aa83c57ba09652d0a..cd50de13af3793bb04357a04ff69328f36ca3f1c 100644 (file)
@@ -269,7 +269,7 @@ static void check_nologin (bool login_to_root)
                        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 @@ int main (int argc, char **argv)
                                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 @@ int main (int argc, char **argv)
                        (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 @@ int main (int argc, char **argv)
                        /* 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 @@ int main (int argc, char **argv)
                        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