summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-08 12:26:32 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-07-29 22:55:33 +1000
commit03a75afa79da19d9c7ac3b4c86b1a402a27e14e5 (patch)
treeb35ce94d6feab9cdac388c9048c5072beeffe54a
parent26eb35409ca458086f679351f39dad972142ca1c (diff)
downloadsamba-03a75afa79da19d9c7ac3b4c86b1a402a27e14e5.tar.gz
samba-03a75afa79da19d9c7ac3b4c86b1a402a27e14e5.tar.bz2
samba-03a75afa79da19d9c7ac3b4c86b1a402a27e14e5.zip
s4-dsdb: Provide a way to force incoming renames to take priority
This should mean that a samba-tool drs replicate --full-sync forces a replication of all objects, regardless of if we think the local name is newer and regards any local name as being in conflict. Andrew Bartlett
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 03248c28dd..6a2fbf4bc6 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3466,7 +3466,8 @@ static int replmd_op_possible_conflict_callback(struct ldb_request *req, struct
goto failed;
}
- rename_incoming_record = !replmd_replPropertyMetaData1_is_newer(omd_name, rmd_name);
+ rename_incoming_record = !(ar->objs->dsdb_repl_flags & DSDB_REPL_FLAG_PRIORITISE_INCOMING) &&
+ !replmd_replPropertyMetaData1_is_newer(omd_name, rmd_name);
if (rename_incoming_record) {
struct GUID guid;
@@ -3855,7 +3856,8 @@ static int replmd_replicated_handle_rename(struct replmd_replicated_request *ar,
md_local = replmd_replPropertyMetaData1_find_attid(omd, DRSUAPI_ATTID_name);
/* if there is no name attribute then we have to assume the
object we've received is in fact newer */
- if (!md_remote || !md_local ||
+ if (ar->objs->dsdb_repl_flags & DSDB_REPL_FLAG_PRIORITISE_INCOMING ||
+ !md_remote || !md_local ||
replmd_replPropertyMetaData1_is_newer(md_local, md_remote)) {
struct ldb_request *req;
int ret;