sesman: fix so shadow accounts aren't incorrectly classified "inactive"
as might happen if sp_max/sp_inact fields are empty or sp_lstchg=0.
This commit is contained in:
parent
9cd634007f
commit
d432609c2a
@ -321,7 +321,10 @@ auth_account_disabled(struct spwd *stp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (today >= (stp->sp_lstchg + stp->sp_max + stp->sp_inact))
|
||||
if ((stp->sp_max >= 0) &&
|
||||
(stp->sp_inact >= 0) &&
|
||||
(stp->sp_lstchg > 0) &&
|
||||
(today >= (stp->sp_lstchg + stp->sp_max + stp->sp_inact)))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user