]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/passwd.c
Fix strchrlen running past end of berval
[openldap] / servers / slapd / passwd.c
index 5c4390c3379c56dbd75de4726378f48e44d0954f..90d666dd8f2994ca29bdc36e459d62edeff2fd87 100644 (file)
@@ -33,6 +33,8 @@
 #include <lutil.h>
 #include <lutil_sha1.h>
 
+const struct berval slap_EXOP_MODIFY_PASSWD = BER_BVC(LDAP_EXOP_MODIFY_PASSWD);
+
 static const char *defhash[] = {
 #ifdef LUTIL_SHA1_BYTES
        "{SSHA}",
@@ -153,9 +155,8 @@ int passwd_extop(
                goto error_return;
        }
 
-#ifndef SLAPD_MULTIMASTER
        /* This does not apply to multi-master case */
-       if(!( !SLAP_SHADOW( op->o_bd ) || be_isupdate( op ))) {
+       if(!( !SLAP_SINGLE_SHADOW( op->o_bd ) || be_isupdate( op ))) {
                /* we SHOULD return a referral in this case */
                BerVarray defref = op->o_bd->be_update_refs
                        ? op->o_bd->be_update_refs : default_referral; 
@@ -177,7 +178,6 @@ int passwd_extop(
                rc = LDAP_UNWILLING_TO_PERFORM;
                goto error_return;
        }
-#endif /* !SLAPD_MULTIMASTER */
 
        /* generate a new password if none was provided */
        if ( qpw->rs_new.bv_len == 0 ) {