From 9daeafbfec8bde7a4c2e0057fb4f06cb54624cd2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Mar 2019 22:38:38 +0100 Subject: dsdb:repl_meta_data: allow CONTROL_DBCHECK_FIX_LINK_DN_NAME to by pass rename We need a way to rename an object without updating the replication meta data. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit 3e8a435d27da899d0e3dab7cbc0a1c738067eba3) --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index c2eafd0a521..b8e03d7ca15 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -3697,6 +3697,7 @@ static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *are static int replmd_rename(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; + struct ldb_control *fix_dn_name_control = NULL; struct replmd_replicated_request *ac; int ret; struct ldb_request *down_req; @@ -3706,6 +3707,12 @@ static int replmd_rename(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); } + fix_dn_name_control = ldb_request_get_control(req, + DSDB_CONTROL_DBCHECK_FIX_LINK_DN_NAME); + if (fix_dn_name_control != NULL) { + return ldb_next_request(module, req); + } + ldb = ldb_module_get_ctx(module); ldb_debug(ldb, LDB_DEBUG_TRACE, "replmd_rename\n"); -- cgit v1.2.1