s4-dsdb: use dsdb_module_search_dn in repl_meta_data
authorAndrew Tridgell <tridge@samba.org>
Wed, 9 Dec 2009 03:35:46 +0000 (14:35 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 9 Dec 2009 07:18:25 +0000 (18:18 +1100)
This allows us to search below the current module. That
will be important when we start using the results of this
search to get the linked attributes meta data right

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index 9ed70d96eb823c64a9885d099c27fedd38e02659..27e4ce0d4425f14ffbfa86dc050556902194eb7a 100644 (file)
@@ -45,6 +45,7 @@
 #include "param/param.h"
 #include "libcli/security/dom_sid.h"
 #include "lib/util/dlinklist.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 
 struct replmd_private {
        TALLOC_CTX *la_ctx;
@@ -870,7 +871,9 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
         *   attribute was changed
         */
 
-       ret = dsdb_search_dn_with_deleted(ldb, msg, &res, msg->dn, NULL);
+       ret = dsdb_module_search_dn(module, msg, &res, msg->dn, NULL,
+                                   DSDB_SEARCH_SHOW_DELETED |
+                                   DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT);
        if (ret != LDB_SUCCESS) {
                talloc_free(ac);
                return ret;