If password aging should not be performed, disable it properly. Just
specifying a "long enough time" is not infinity.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
/*
* The last and max fields must be present for an account
- * to have an expired password. A maximum of >10000 days
- * is considered to be infinite.
+ * to have an expired password.
*/
if ( (-1 == sp->sp_lstchg)
- || (-1 == sp->sp_max)
- || (sp->sp_max >= 10000)) {
+ || (-1 == sp->sp_max)) {
return 0;
}
if (lstchgdate == 0) {
(void) puts (_("password must be changed"));
} else if ( (lstchgdate < 0)
- || (maxdays >= 10000)
|| (maxdays < 0)
|| (LONG_MAX - lstchgdate < maxdays))
{
(void) puts (_("password must be changed"));
} else if ( (lstchgdate < 0)
|| (inactdays < 0)
- || (maxdays >= 10000)
|| (maxdays < 0)
|| (LONG_MAX - inactdays < maxdays)
|| (LONG_MAX - lstchgdate < maxdays + inactdays))