summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-08-19 15:53:19 +1000
committerAndrew Tridgell <tridge@samba.org>2009-08-19 15:53:19 +1000
commita0df109d663e76e6ab47a5c68bb68eb30c9ba4b0 (patch)
treeb26b814225aa131d3bd04dff6e5ab54bcade0b2d /source4/dsdb
parente38f38fe484dda2db871b7c83d8132fd10f0cabd (diff)
downloadsamba-a0df109d663e76e6ab47a5c68bb68eb30c9ba4b0.tar.gz
samba-a0df109d663e76e6ab47a5c68bb68eb30c9ba4b0.tar.bz2
samba-a0df109d663e76e6ab47a5c68bb68eb30c9ba4b0.zip
added basic support for rename in DRS replication
Added simple DRS rename support in replication. This should be done async, and I'm not sure if we should also do any repl data updates to indicate the rename. I'm still learning how this stuff works, but at least this allows a rename on a DC to propogate correctly
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);