]> git.sur5r.net Git - openldap/commitdiff
SLAP_NVALUES updates
authorKurt Zeilenga <kurt@openldap.org>
Sun, 16 Mar 2003 06:03:23 +0000 (06:03 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 16 Mar 2003 06:03:23 +0000 (06:03 +0000)
servers/slapd/back-bdb/attribute.c
servers/slapd/back-bdb/passwd.c

index f5cbdf7577a693ecd4900d8ec6fd8c3332e6c71b..921491753f22161714383e32a5973c70c8026a7b 100644 (file)
@@ -202,11 +202,22 @@ dn2entry_retry:
                if( conn != NULL
                        && op != NULL
                        && access_allowed(be, conn, op, e, entry_at,
-                               &attr->a_vals[i], ACL_AUTH, &acl_state ) == 0)
+#ifdef SLAP_NVALUES
+                               attr->a_nvals ? &attr->a_nvals[i] : &attr->a_vals[i],
+#else
+                               &attr->a_vals[i],
+#endif
+                               ACL_AUTH, &acl_state ) == 0)
                {
                        continue;
                }
+
+#ifdef SLAP_NVALUES
+               ber_dupbv( &v[j],
+                       attr->a_nvals ? &attr->a_nvals[i] : &attr->a_vals[i] );
+#else
                ber_dupbv( &v[j], &attr->a_vals[i] );
+#endif
 
                if( v[j].bv_val != NULL ) j++;
        }
index 685a187cbd2c60ac522861181e3309a8279defd6..d825c782becb7c8492c8cbe706ce2a45fc00df8d 100644 (file)
@@ -219,7 +219,7 @@ retry:      /* transaction retry */
                ml.sml_desc = slap_schema.si_ad_userPassword;
                ml.sml_values = vals;
 #ifdef SLAP_NVALUES
-               ml.sml_nvalues = vals;
+               ml.sml_nvalues = NULL;
 #endif
                ml.sml_op = LDAP_MOD_REPLACE;
                ml.sml_next = NULL;