summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-12-06 18:26:11 +1300
committerKarolin Seeger <kseeger@samba.org>2020-01-21 10:11:39 +0000
commit86023642c3961f00d0e4e6c71086739d9d568276 (patch)
tree03f141e2a17045e3f94a8ff99de83657f28bfc38 /source4
parent9e126852a6912e545641a506491f425a987e3b80 (diff)
downloadsamba-86023642c3961f00d0e4e6c71086739d9d568276.tar.gz
repl_meta_data: Only reset replMetaData entry for name if we made a conflict name here
We previously set it for any rename Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index e675a8b3ede..a8a61d5df7c 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -5888,7 +5888,7 @@ static int replmd_replicated_apply_search_for_parent(struct replmd_replicated_re
static int replmd_replicated_handle_rename(struct replmd_replicated_request *ar,
struct ldb_message *msg,
struct ldb_request *parent,
- bool *renamed)
+ bool *renamed_to_conflict)
{
int ret;
TALLOC_CTX *tmp_ctx = talloc_new(msg);
@@ -5957,7 +5957,7 @@ static int replmd_replicated_handle_rename(struct replmd_replicated_request *ar,
}
msg->dn = new_dn;
- *renamed = true;
+ *renamed_to_conflict = true;
talloc_free(tmp_ctx);
return LDB_SUCCESS;
}
@@ -6062,6 +6062,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
bool take_remote_isDeleted = false;
bool sd_updated = false;
bool renamed = false;
+ bool renamed_to_conflict = false;
bool is_schema_nc = false;
NTSTATUS nt_status;
const struct ldb_val *old_rdn, *new_rdn;
@@ -6162,7 +6163,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
* the peer has an older name to what we have (see
* replmd_replicated_apply_search_callback())
*/
- ret = replmd_replicated_handle_rename(ar, msg, ar->req, &renamed);
+ ret = replmd_replicated_handle_rename(ar, msg, ar->req, &renamed_to_conflict);
/*
* This looks strange, but we must set this after any
@@ -6170,10 +6171,8 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
* happen (which might matter if we have a new parent)
*
* The additional case of calling
- * replmd_op_name_modify_callback (below) is:
- * - a no-op if there was no name change
- * and
- * - called in the default case regardless.
+ * replmd_op_name_modify_callback (below) is
+ * controlled by renamed_to_conflict.
*/
renamed = true;
}
@@ -6187,7 +6186,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
return replmd_replicated_request_werror(ar, WERR_DS_DRA_DB_ERROR);
}
- if (renamed == true) {
+ if (renamed_to_conflict == true) {
/*
* Set the callback to one that will fix up the name
* metadata on the new conflict DN