diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 10870f3755..8b374a8f87 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -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;