* libmisc/age.c: Return a specific message when sp_lstchg is null.
This commit is contained in:
parent
996e842149
commit
f67403ba01
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user