summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 53d6d0749c..5d4c486d9a 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -751,15 +751,19 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
omd.version = 1;
/*
- * TODO: add rename conflict handling
+ * TODO: check repl data is correct after a rename
*/
if (ldb_dn_compare(msg->dn, ar->search_msg->dn) != 0) {
- ldb_debug_set(ldb, LDB_DEBUG_FATAL, "replmd_replicated_apply_merge[%u]: rename not supported",
- ar->index_current);
- ldb_debug(ldb, LDB_DEBUG_FATAL, "%s => %s\n",
+ ldb_debug(ldb, LDB_DEBUG_TRACE, "replmd_replicated_request rename %s => %s\n",
ldb_dn_get_linearized(ar->search_msg->dn),
ldb_dn_get_linearized(msg->dn));
- return replmd_replicated_request_werror(ar, WERR_NOT_SUPPORTED);
+ if (ldb_rename(ldb, ar->search_msg->dn, msg->dn) != LDB_SUCCESS) {
+ ldb_debug(ldb, LDB_DEBUG_FATAL, "replmd_replicated_request rename %s => %s failed - %s\n",
+ ldb_dn_get_linearized(ar->search_msg->dn),
+ ldb_dn_get_linearized(msg->dn),
+ ldb_errstring(ldb));
+ return replmd_replicated_request_werror(ar, WERR_DS_DRA_DB_ERROR);
+ }
}
ret = ldb_sequence_number(ldb, LDB_SEQ_NEXT, &seq_num);