]> git.sur5r.net Git - openldap/commitdiff
Fix test006-acls
authorKurt Zeilenga <kurt@openldap.org>
Sat, 15 Mar 2003 23:02:55 +0000 (23:02 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 15 Mar 2003 23:02:55 +0000 (23:02 +0000)
servers/slapd/acl.c

index 9f7be5ef59408a6e4802c5047251bc588d55da37..02bf54eeae1db4da9bc8e5a18f4d67c42c627b81 100644 (file)
@@ -1348,7 +1348,14 @@ acl_check_modlist(
                case LDAP_MOD_ADD:
                        assert( mlist->sml_bvalues != NULL );
 
-                       for ( bv = mlist->sml_bvalues; bv->bv_val != NULL; bv++ ) {
+#ifdef SLAP_NVALUES
+                       for ( bv = mlist->sml_nvalues
+                                       ? mlist->sml_nvalues : mlist->sml_values;
+                               bv->bv_val != NULL; bv++ )
+#else
+                       for ( bv = mlist->sml_bvalues; bv->bv_val != NULL; bv++ )
+#endif
+                       {
                                if ( ! access_allowed( be, conn, op, e,
                                        mlist->sml_desc, bv, ACL_WRITE, &state ) )
                                {
@@ -1366,7 +1373,14 @@ acl_check_modlist(
                                }
                                break;
                        }
-                       for ( bv = mlist->sml_bvalues; bv->bv_val != NULL; bv++ ) {
+#ifdef SLAP_NVALUES
+                       for ( bv = mlist->sml_nvalues
+                                       ? mlist->sml_nvalues : mlist->sml_values;
+                               bv->bv_val != NULL; bv++ )
+#else
+                       for ( bv = mlist->sml_bvalues; bv->bv_val != NULL; bv++ )
+#endif
+                       {
                                if ( ! access_allowed( be, conn, op, e,
                                        mlist->sml_desc, bv, ACL_WRITE, &state ) )
                                {