s4-libnet_vampire: Ignore some attributes when building working schema cache master-push
authorKamen Mazdrashki <kamenim@samba.org>
Tue, 1 Mar 2011 00:32:19 +0000 (02:32 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Tue, 1 Mar 2011 00:35:09 +0000 (02:35 +0200)
Working schema cache will be used to convert replicated Schema objects
again later, i.e. used as reference, so we don't need to resolve all
attribute OIDs for working Schema cache to be usable.

source4/libnet/libnet_vampire.c

index 91a11eec67fa90f14b845be0d045c34a012efa57..80b1a61b573f1405bd6ed5951e7a1af3bf8ee76d 100644 (file)
@@ -246,6 +246,14 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s
        int ret, pass_no;
        bool ok;
        uint64_t seq_num;
+       uint32_t ignore_attids[] = {
+                       DRSUAPI_ATTID_auxiliaryClass,
+                       DRSUAPI_ATTID_mayContain,
+                       DRSUAPI_ATTID_mustContain,
+                       DRSUAPI_ATTID_possSuperiors,
+                       DRSUAPI_ATTID_systemPossSuperiors,
+                       DRSUAPI_ATTID_INVALID
+       };
 
        DEBUG(0,("Analyze and apply schema objects\n"));
 
@@ -349,6 +357,7 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s
                         */
                        status = dsdb_convert_object_ex(s->ldb, working_schema, pfm_remote,
                                                        cur, c->gensec_skey,
+                                                       ignore_attids,
                                                        tmp_ctx, &object);
                        if (!W_ERROR_IS_OK(status)) {
                                DEBUG(1,("Warning: Failed to convert schema object %s into ldb msg\n",