From: nekral-guest Date: Mon, 20 Apr 2009 14:04:48 +0000 (+0000) Subject: * NEWS, src/lastlog.c: Fix regression causing empty reports. X-Git-Tag: 4.1.4~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9efd6a53d2776a520dab9eddc515867f3356a836;p=thirdparty%2Fshadow.git * NEWS, src/lastlog.c: Fix regression causing empty reports. --- diff --git a/ChangeLog b/ChangeLog index d2005db50..9a7db38f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-20 Sven Joachim + + * NEWS, src/lastlog.c: Fix regression causing empty reports. + 2009-04-20 Nicolas François * src/login.c: Get rid of pwent. pwd is sufficient as long as it diff --git a/NEWS b/NEWS index 590881b9b..108e5d228 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ shadow-4.1.3.1 -> shadow-4.1.3.2 UNRELEASED lead to DOS attacks. * (PAM) Even if the user was already authenticated (-f flag), ask the user to update his authentication token if needed. +- lastlog + * Fix regression causing empty reports. *** translation - Updated Korean translation diff --git a/src/lastlog.c b/src/lastlog.c index 8f08e87f3..a8ef745ba 100644 --- a/src/lastlog.c +++ b/src/lastlog.c @@ -266,8 +266,7 @@ int main (int argc, char **argv) exit (1); } - print (); - /* Get the laslog size */ + /* Get the lastlog size */ if (fstat (fileno (lastlogfile), &statbuf) != 0) { fprintf (stderr, _("lastlog: Cannot get the size of %s: %s\n"), @@ -275,6 +274,8 @@ int main (int argc, char **argv) exit (1); } + print (); + fclose (lastlogfile); exit (0); }