From f469369fdf71b52930fdcc1f68632a727db38fc1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 28 Sep 2011 14:35:27 +1000 Subject: s4-dsdb: add the DSDB_CONTROL_PARTIAL_REPLICA when needed when we are adding an object via DRS, we need to add the DSDB_CONTROL_PARTIAL_REPLICA control if we are replicating a partial replica, so ensure the partition module creates new NCs as partial replicas --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/dsdb/samdb/ldb_modules') diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 13b87559c1..7a642426b4 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -3558,6 +3558,15 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) false, NULL); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + if (ar->objs->dsdb_repl_flags & DSDB_REPL_FLAG_PARTIAL_REPLICA) { + /* this tells the partition module to make it a + partial replica if creating an NC */ + ret = ldb_request_add_control(change_req, + DSDB_CONTROL_PARTIAL_REPLICA, + false, NULL); + if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); + } + return ldb_next_request(ar->module, change_req); } -- cgit