mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-17 17:48:20 -05: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
1 changed files with 7 additions and 3 deletions
|
|
@ -338,14 +338,18 @@ account_locked( Operation *op, Entry *e,
|
||||||
time_t then, now;
|
time_t then, now;
|
||||||
Modifications *m;
|
Modifications *m;
|
||||||
|
|
||||||
if (!pp->pwdLockoutDuration)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if ((then = parse_time( vals[0].bv_val )) == (time_t)0)
|
if ((then = parse_time( vals[0].bv_val )) == (time_t)0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
now = slap_get_time();
|
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)
|
if (now < then + pp->pwdLockoutDuration)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue