]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/passwd.c
NVALUES: fix a couple of value_find_ex() calls
[openldap] / servers / slapd / back-bdb / passwd.c
index 7f153e80bdcd671f0c45ecf23ca58044e2bf4f34..685a187cbd2c60ac522861181e3309a8279defd6 100644 (file)
@@ -123,6 +123,7 @@ retry:      /* transaction retry */
                rc = TXN_ABORT( ltid );
                ltid = NULL;
                op->o_private = NULL;
+               op->o_do_not_cache = opinfo.boi_acl_cache;
                if( rc != 0 ) {
                        rc = LDAP_OTHER;
                        *text = "internal error";
@@ -156,6 +157,7 @@ retry:      /* transaction retry */
        opinfo.boi_txn = ltid;
        opinfo.boi_locker = locker;
        opinfo.boi_err = 0;
+       opinfo.boi_acl_cache = op->o_do_not_cache;
        op->o_private = &opinfo;
 
        /* get entry */
@@ -215,13 +217,19 @@ retry:    /* transaction retry */
                vals[1].bv_val = NULL;
 
                ml.sml_desc = slap_schema.si_ad_userPassword;
-               ml.sml_bvalues = vals;
+               ml.sml_values = vals;
+#ifdef SLAP_NVALUES
+               ml.sml_nvalues = vals;
+#endif
                ml.sml_op = LDAP_MOD_REPLACE;
                ml.sml_next = NULL;
 
                rc = bdb_modify_internal( be, conn, op, ltid,
                        &ml, e, text, textbuf, textlen );
 
+               if ( (rc == LDAP_INSUFFICIENT_ACCESS) && opinfo.boi_err ) {
+                       rc = opinfo.boi_err;
+               }
                switch(rc) {
                case DB_LOCK_DEADLOCK:
                case DB_LOCK_NOTGRANTED: