summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-09-17 15:28:32 -0700
committerKarolin Seeger <kseeger@samba.org>2013-09-27 09:28:56 +0200
commit5c635611c0a194d6f683c9e8a5219b949a74dcf3 (patch)
tree9c4b392ddc2a25317dbde606a6df3d91ae1c1fd0 /source4
parent66f843ec1fb6551de961d54c3d0364ef51a66432 (diff)
downloadsamba-5c635611c0a194d6f683c9e8a5219b949a74dcf3.tar.gz
dsdb-repl_meta_data: Do not re-delete the Deleted Objects DN during replication
We need to ensure we do not re-delete the Deleted Objects DN during replication. It itself not entirely a deleted object, but has isDeleted set. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c42db8975f8f84ce576c97ad95ca59ba5170d596)
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 7bd0265f9d..e562e2467f 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -4655,7 +4655,11 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
*/
static int replmd_replicated_apply_isDeleted(struct replmd_replicated_request *ar)
{
- if (ar->isDeleted) {
+ struct ldb_dn *deleted_objects_dn;
+ struct ldb_message *msg = ar->objs->objects[ar->index_current].msg;
+ int ret = dsdb_get_deleted_objects_dn(ldb_module_get_ctx(ar->module), msg, msg->dn,
+ &deleted_objects_dn);
+ if (ar->isDeleted && (ret != LDB_SUCCESS || ldb_dn_compare(msg->dn, deleted_objects_dn) != 0)) {
/*
* Do a delete here again, so that if there is
* anything local that conflicts with this
@@ -4669,11 +4673,9 @@ static int replmd_replicated_apply_isDeleted(struct replmd_replicated_request *a
*/
/* This has been updated to point to the DN we eventually did the modify on */
- struct ldb_message *msg = ar->objs->objects[ar->index_current].msg;
struct ldb_request *del_req;
struct ldb_result *res;
- int ret;
TALLOC_CTX *tmp_ctx = talloc_new(ar);
if (!tmp_ctx) {