ITS#6084 handle pwdAccountLockedTime values set into the future (i.e.,

lame way of setting an expiration date.)
This commit is contained in:
Howard Chu 2009-06-30 12:12:53 +00:00
parent 98ebf1950e
commit 8a0b05bfeb

View File

@ -338,14 +338,18 @@ account_locked( Operation *op, Entry *e,
time_t then, now;
Modifications *m;
if (!pp->pwdLockoutDuration)
return 1;
if ((then = parse_time( vals[0].bv_val )) == (time_t)0)
return 1;
now = slap_get_time();
/* Still in the future? not yet in effect */
if (now < then)
return 0;
if (!pp->pwdLockoutDuration)
return 1;
if (now < then + pp->pwdLockoutDuration)
return 1;