From: Howard Chu Date: Mon, 5 Apr 2004 23:09:57 +0000 (+0000) Subject: Allow users to change their own password by default, fix history check X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~137 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4b2febb3dbbcb0d1e7be9d7336f915ec9f5b4d67;p=openldap Allow users to change their own password by default, fix history check when SafeModify is false. --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 4091ced8b9..4d99ad91db 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -365,6 +365,9 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp ) memset( pp, 0, sizeof(PassPolicy) ); + /* Users can change their own password by default */ + pp->pwdAllowUserChange = 1; + if ((a = attr_find( e->e_attrs, ad_pwdPolicySubentry )) == NULL) { /* * entry has no password policy assigned - use default @@ -1447,7 +1450,8 @@ ppolicy_modify( Operation *op, SlapReply *rs ) } } - if (delmod && (pa = attr_find( e->e_attrs, pp.ad )) != NULL) { + /* pa is used in password history check below, be sure it's set */ + if ((pa = attr_find( e->e_attrs, pp.ad )) != NULL && delmod) { /* * we have a password to check */