r20769: - it's wrong to add the schemaInfo blob as 2nd value to the prefixMap attribu...
authorStefan Metzmacher <metze@samba.org>
Sun, 14 Jan 2007 15:56:55 +0000 (15:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:40:50 +0000 (14:40 -0500)
- as the schemaInfo attribute is already applied to the ldb because it's a replicated attribute
  we should not replace it

metze
(This used to be commit 56109df406a60ef27a2a3d94979d46c470e32117)

source4/torture/libnet/libnet_BecomeDC.c

index c11801e5db32438c48648d0325423238aedf0902..e4cd4ec35f800a504921cf885374ba5b1644bce3 100644 (file)
@@ -430,16 +430,12 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
                return werror_to_ntstatus(status);
        }
 
+       /* we only add prefixMap here, because schemaInfo is a replicated attribute and already applied */
        ret = ldb_msg_add_value(msg, "prefixMap", &prefixMap_val, &prefixMap_el);
        if (ret != LDB_SUCCESS) {
                return NT_STATUS_FOOBAR;
        }
        prefixMap_el->flags = LDB_FLAG_MOD_REPLACE;
-       ret = ldb_msg_add_value(msg, "prefixMap", &schemaInfo_val, &schemaInfo_el);
-       if (ret != LDB_SUCCESS) {
-               return NT_STATUS_FOOBAR;
-       }
-       schemaInfo_el->flags = LDB_FLAG_MOD_REPLACE;
 
        ret = ldb_modify(s->ldb, msg);
        if (ret != LDB_SUCCESS) {