s4-dsdb: Request extended DN and show deleted when searching for a possible parent
authorAndrew Bartlett <abartlet@samba.org>
Tue, 31 Jul 2012 07:10:42 +0000 (17:10 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 31 Jul 2012 12:15:29 +0000 (14:15 +0200)
This fixes up the lastKnownParent attribute on lostAndFound objects to have a GUID

(found by dbcheck).

Andrew Bartlett

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index 930696a26a48bfe1cc2b3c9de7ed29467bfc19c7..3e15eefc1f47ae85193aa02513e59101072f6491 100644 (file)
@@ -3894,8 +3894,10 @@ static int replmd_replicated_apply_search_for_parent(struct replmd_replicated_re
                                   ar->req);
        LDB_REQ_SET_LOCATION(search_req);
 
-       ret = ldb_request_add_control(search_req, LDB_CONTROL_SHOW_RECYCLED_OID,
-                                     true, NULL);
+       ret = dsdb_request_add_controls(search_req, 
+                                       DSDB_SEARCH_SHOW_RECYCLED|
+                                       DSDB_SEARCH_SHOW_DELETED|
+                                       DSDB_SEARCH_SHOW_EXTENDED_DN);
        if (ret != LDB_SUCCESS) {
                return ret;
        }