summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-05 20:38:14 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-10 11:12:05 +0100
commite754f0c5c6add20f8f2217033205432597d133fd (patch)
tree97645146fa6b301878edbdf3b05ca1d800c908fe /source4/dsdb
parent42da193c37e1f3076b1299e761bc973f290bb800 (diff)
downloadsamba-e754f0c5c6add20f8f2217033205432597d133fd.tar.gz
samba-e754f0c5c6add20f8f2217033205432597d133fd.tar.bz2
samba-e754f0c5c6add20f8f2217033205432597d133fd.zip
s4:repl_meta_data LDB module - remove the current partition control unless it was requested
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c12
1 files changed, 10 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 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)));