From: Howard Chu Date: Fri, 8 Jun 2007 09:23:49 +0000 (+0000) Subject: ITS#4970 ignore pwdMinAge if pwdReset is TRUE X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~416 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8cafa0b117733eaeceacb44e1b5bc6b447ca81c9;p=openldap ITS#4970 ignore pwdMinAge if pwdReset is TRUE --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index aa7bcee637..438ae8c2d3 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -1694,7 +1694,10 @@ ppolicy_modify( Operation *op, SlapReply *rs ) goto return_results; } - if (pp.pwdMinAge > 0) { + /* Check age, but only if pwdReset is not TRUE */ + pa = attr_find( e->e_attrs, ad_pwdReset ); + if ((!pa || !bvmatch( &pa->a_nvals[0], &slap_true_bv )) && + pp.pwdMinAge > 0) { time_t pwtime = (time_t)-1, now; int age;