From e754f0c5c6add20f8f2217033205432597d133fd Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 5 Mar 2011 20:38:14 +0100 Subject: s4:repl_meta_data LDB module - remove the current partition control unless it was requested --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 6fd6d7fa14..fb87fd3265 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -374,8 +374,16 @@ static int replmd_op_callback(struct ldb_request *req, struct ldb_reply *ares) partition_ctrl = ldb_reply_get_control(ares, DSDB_CONTROL_CURRENT_PARTITION_OID); - /* Remove the 'partition' control from what we pass up the chain */ - controls = ldb_controls_except_specified(ares->controls, ares, partition_ctrl); + controls = ares->controls; + if (ldb_request_get_control(ac->req, + DSDB_CONTROL_CURRENT_PARTITION_OID) == NULL) { + /* + * Remove the current partition control from what we pass up + * the chain if it hasn't been requested manually. + */ + controls = ldb_controls_except_specified(ares->controls, ares, + partition_ctrl); + } if (ares->error != LDB_SUCCESS) { DEBUG(0,("%s failure. Error is: %s\n", __FUNCTION__, ldb_strerror(ares->error))); -- cgit