s4-drs: include deleted objects in getncchanges reply
authorAndrew Tridgell <tridge@samba.org>
Thu, 24 Sep 2009 14:12:14 +0000 (07:12 -0700)
committerAndrew Tridgell <tridge@samba.org>
Thu, 24 Sep 2009 17:35:40 +0000 (10:35 -0700)
Even though we don't create deleted objects ourselves yet, we need to
pass along deleted objects we receive from other replication partners

source4/rpc_server/drsuapi/drsutil.c

index 9aef3172b9d55bc770f7895c93a459016638e230..410563cf584ac03276cf6c81e1a970df408da721 100644 (file)
@@ -88,6 +88,11 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
                return ret;
        }
 
+       ret = ldb_request_add_control(req, LDB_CONTROL_SHOW_DELETED_OID, true, NULL);
+       if (ret != LDB_SUCCESS) {
+               return ret;
+       }
+
        if (sort_attrib) {
                struct ldb_server_sort_control **sort_control;
                sort_control = talloc_array(req, struct ldb_server_sort_control *, 2);
@@ -114,7 +119,7 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
        }
 
        talloc_free(req);
-       *_res = res;
+       *_res = talloc_steal(mem_ctx, res);
        return ret;
 }