From 65a35acbf33dd6dfd6ba6b2fb76580126829b597 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 21 Mar 2016 15:49:33 +1300 Subject: repl: Pass in the full partition DN to dsdb_replicated_objects_convert() When we were processing an EXOP, we would pass in a DN specific to that operation, but this stopped repl_meta_data from finding the parent object Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- source4/dsdb/repl/drepl_out_helpers.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/repl/drepl_out_helpers.c') diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index a1e8dcbb244..a217e833e73 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -671,6 +671,8 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req WERROR status; NTSTATUS nt_status; uint32_t dsdb_repl_flags = 0; + struct ldb_dn *nc_root = NULL; + int ret; switch (ctr_level) { case 1: @@ -744,9 +746,22 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req dsdb_repl_flags |= DSDB_REPL_FLAG_EXPECT_NO_SECRETS; } + if (state->op->extended_op != DRSUAPI_EXOP_NONE) { + ret = dsdb_find_nc_root(service->samdb, partition, + partition->dn, &nc_root); + if (ret != LDB_SUCCESS) { + DEBUG(0,(__location__ ": Failed to find nc_root for %s\n", + ldb_dn_get_linearized(partition->dn))); + tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR); + return; + } + } else { + nc_root = partition->dn; + } + status = dsdb_replicated_objects_convert(service->samdb, working_schema ? working_schema : schema, - partition->nc.dn, + nc_root, mapping_ctr, object_count, first_object, -- cgit v1.2.1