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.
ulab-next-nosound
mancha 9 years ago
parent 9cd634007f
commit d432609c2a
No known key found for this signature in database
GPG Key ID: 1E15632F09AA1683

@ -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…
Cancel
Save