Merge pull request #215 from mancha1/shadow-fix

sesman: fix so shadow accounts aren't incorrectly classified "inactive"
This commit is contained in:
jsorg71 2015-02-18 10:51:03 -08:00
commit c3164eac76

View File

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