]> granicus.if.org Git - shadow/commitdiff
* src/su.c: No need to call expire() if there are no shadow entry.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:25:40 +0000 (18:25 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:25:40 +0000 (18:25 +0000)
No need to convert a passwd entry into an spwd entry in that case.

ChangeLog
src/su.c

index 4648a19eed88e1507aa07d6161112b49445a79d1..88bef737e38b19d8f2d0903e75bcaedcc44713e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,14 @@
-2011-06-12  Thomas Blein  <tblein@tblein.eu>
-
-       * man/po/fr.po: French manpages translation
-
-2011-06-05  Nicolas François  <nicolas.francois@centraliens.net>
+2011-06-10  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/su.c: Updating pwent after expire() is not useful. Only the
        password information may have changed and they are not used
        anymore afterwards.
+       * src/su.c: No need to call expire() if there are no shadow entry.
+       No need to convert a passwd entry into an spwd entry in that case.
+
+2011-06-12  Thomas Blein  <tblein@tblein.eu>
+
+       * man/po/fr.po: French manpages translation
 
 2011-06-05  Nicolas François  <nicolas.francois@centraliens.net>
 
index cdc26f9dbdc622c4d06b36db36e2655ee3df2904..d52b92c9c4217e84bb076201d7ed96014c0e456b 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -863,11 +863,7 @@ int main (int argc, char **argv)
         * expired accounts, but normal users can't become a user with an
         * expired password.
         */
-       if (!amroot) {
-               if (NULL == spwd) {
-                       spwd = pwd_to_spwd (&pwent);
-               }
-
+       if ((!amroot) && (NULL != spwd)) {
                (void) expire (&pwent, spwd);
        }