mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
ITS#6084 handle pwdAccountLockedTime values set into the future (i.e.,
lame way of setting an expiration date.)
This commit is contained in:
parent
98ebf1950e
commit
8a0b05bfeb
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user