diff --git a/ChangeLog b/ChangeLog index 4648a19e..88bef737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ -2011-06-12 Thomas Blein - - * man/po/fr.po: French manpages translation - -2011-06-05 Nicolas François +2011-06-10 Nicolas François * 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 + + * man/po/fr.po: French manpages translation 2011-06-05 Nicolas François diff --git a/src/su.c b/src/su.c index cdc26f9d..d52b92c9 100644 --- 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); }