]> git.sur5r.net Git - openldap/commitdiff
according to draft-behera, this attribute only affects password modifies by self...
authorPierangelo Masarati <ando@OpenLDAP.org>
Sun, 21 Aug 2011 00:50:33 +0000 (18:50 -0600)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 6 Oct 2011 23:50:35 +0000 (16:50 -0700)
servers/slapd/overlays/ppolicy.c

index 43cc345d3ee9bf150cdf1ca4ad08f7ed0e3a49a5..fad06485802d5b3f80679b5a27c7db77f1ec04b9 100644 (file)
@@ -1788,7 +1788,10 @@ ppolicy_modify( Operation *op, SlapReply *rs )
 
        if (be_isroot( op )) goto do_modify;
 
-       if (!pp.pwdAllowUserChange) {
+       /* NOTE: according to draft-behera-ldap-password-policy
+        * pwdAllowUserChange == FALSE must only prevent pwd changes
+        * by the user the pwd belongs to (ITS#7021) */
+       if (!pp.pwdAllowUserChange && dn_match(&op->o_req_ndn, &op->o_ndn)) {
                rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
                rs->sr_text = "User alteration of password is not allowed";
                pErr = PP_passwordModNotAllowed;