* 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.
This commit is contained in:
nekral-guest 2009-04-11 18:37:08 +00:00
parent 42590e062f
commit cab74eddef
5 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2009-04-11 Nicolas François <nicolas.francois@centraliens.net>
* 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 <nicolas.francois@centraliens.net>
* src/useradd.c, src/usermod.c: Only call selinux_update_mapping()

View File

@ -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 *);

View File

@ -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;

View File

@ -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.

View File

@ -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 */