* libmisc/age.c: Return a specific message when sp_lstchg is null.

This commit is contained in:
nekral-guest 2009-04-05 21:22:53 +00:00
parent 996e842149
commit f67403ba01
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-04-04 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/age.c: Return a specific message when sp_lstchg is null.
2009-03-21 Nicolas François <nicolas.francois@centraliens.net>
* lib/sgetpwent.c, lib/sgetgrent.c: Use get_uid and get_gid to

View File

@ -174,6 +174,12 @@ void agecheck (const struct passwd *pw, const struct spwd *sp)
|| (-1 == sp->sp_warn)) {
return;
}
if (0 == sp->sp_lstchg) {
(void) puts (_("You must change your password."));
return;
}
remain = sp->sp_lstchg + sp->sp_max - now;
if (remain <= sp->sp_warn) {
remain /= DAY / SCALE;