* 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

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