]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb: Move operational below repl_meta_data so we can query parentGUID
authorAndrew Bartlett <abartlet@samba.org>
Tue, 15 Mar 2016 02:11:30 +0000 (15:11 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 6 Jun 2016 14:36:22 +0000 (16:36 +0200)
This avoids re-adding the same code in repl_meta_data or making a shared subroutine

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/samba_dsdb.c

index 316dcf8c14ba19687a9adc87215245ec55f4beee..e051913b2b92ca9303723aa9dd5a614c87cac0da 100644 (file)
@@ -512,6 +512,7 @@ static int oc_op_callback(struct ldb_request *req, struct ldb_reply *ares)
        struct ldb_request *search_req;
        struct ldb_dn *base_dn;
        int ret;
+       static const char *attrs[] = {"nTSecurityDescriptor", "*", NULL};
 
        ac = talloc_get_type(req->context, struct oc_context);
        ldb = ldb_module_get_ctx(ac->module);
@@ -544,7 +545,7 @@ static int oc_op_callback(struct ldb_request *req, struct ldb_reply *ares)
                : ac->req->op.mod.message->dn;
        ret = ldb_build_search_req(&search_req, ldb, ac, base_dn,
                                   LDB_SCOPE_BASE, "(objectClass=*)",
-                                  NULL, NULL, ac,
+                                  attrs, NULL, ac,
                                   get_search_callback, ac->req);
        LDB_REQ_SET_LOCATION(search_req);
        if (ret != LDB_SUCCESS) {
index 6596d457de1b33e1b86dc52a86d339e570fcdef9..b58a0074b86367613b1a216daf514d3815b9f19d 100644 (file)
@@ -4836,6 +4836,9 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
        char *tmp_str;
        char *filter;
        struct ldb_request *search_req;
+       static const char *attrs[] = { "*", "instanceType",
+                                      "replPropertyMetaData", "nTSecurityDescriptor",
+                                      NULL };
 
        if (ar->index_current >= ar->objs->num_objects) {
                /* done with it, go to next stage */
@@ -4859,7 +4862,7 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
                                   ar->objs->partition_dn,
                                   LDB_SCOPE_SUBTREE,
                                   filter,
-                                  NULL,
+                                  attrs,
                                   NULL,
                                   ar,
                                   replmd_replicated_apply_search_callback,
index ea72ec836d8f8e461f7306493d0b6dab087036db..3297eb15c2e44b715b2e9fae6587a17b5696390c 100644 (file)
@@ -280,7 +280,6 @@ static int samba_dsdb_init(struct ldb_module *module)
                                             "aclread",
                                             "samldb",
                                             "password_hash",
-                                            "operational",
                                             "instancetype",
                                             "objectclass_attrs",
                                             NULL };
@@ -294,6 +293,7 @@ static int samba_dsdb_init(struct ldb_module *module)
                "rdn_name",
                "subtree_delete",
                "repl_meta_data",
+               "operational",
                "subtree_rename",
                "linked_attributes",
                NULL};