diff --git a/sesman/verify_user.c b/sesman/verify_user.c index 9dc77efc..0c7702b5 100644 --- a/sesman/verify_user.c +++ b/sesman/verify_user.c @@ -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; }