diff --git a/ChangeLog b/ChangeLog index 0cd52ba3..72c846c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-11 Nicolas François + + * lib/prototypes.h, libmisc/age.c, src/expiry.c, src/login.c: A + shadow entry is now sufficient for agecheck. Remove the first + passwd entry parameter. + 2009-04-11 Nicolas François * src/useradd.c, src/usermod.c: Only call selinux_update_mapping() diff --git a/lib/prototypes.h b/lib/prototypes.h index f5528a46..1145ff46 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -65,7 +65,7 @@ extern int add_groups (const char *); #endif /* age.c */ -extern void agecheck (const struct passwd *, const struct spwd *); +extern void agecheck (const struct spwd *); extern int expire (const struct passwd *, const struct spwd *); extern int isexpired (const struct passwd *, const struct spwd *); diff --git a/libmisc/age.c b/libmisc/age.c index de69ae30..f9695926 100644 --- a/libmisc/age.c +++ b/libmisc/age.c @@ -160,7 +160,7 @@ int expire (const struct passwd *pw, const struct spwd *sp) * to expire and warns the user of the pending password expiration. */ -void agecheck (const struct passwd *pw, const struct spwd *sp) +void agecheck (const struct spwd *sp) { long now = (long) time ((time_t *) 0) / SCALE; long remain; diff --git a/src/expiry.c b/src/expiry.c index 32bb508e..c284d7c0 100644 --- a/src/expiry.c +++ b/src/expiry.c @@ -127,7 +127,7 @@ int main (int argc, char **argv) /* * Print out number of days until expiration. */ - agecheck (pwd, spwd); + agecheck (spwd); /* * Exit with status indicating state of account. diff --git a/src/login.c b/src/login.c index e4eb37e9..081aecc4 100644 --- a/src/login.c +++ b/src/login.c @@ -427,8 +427,10 @@ int main (int argc, char **argv) char fromhost[512]; struct passwd *pwd; char **envp = environ; +#ifndef static char temp_pw[2]; static char temp_shell[] = "/bin/sh"; +#endif #ifdef USE_PAM int retcode; @@ -1200,7 +1202,7 @@ int main (int argc, char **argv) #endif printf (".\n"); } - agecheck (&pwent, spwd); + agecheck (spwd); mailcheck (); /* report on the status of mail */ #endif /* !USE_PAM */