summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-28 14:35:27 +1000
committerAndrew Tridgell <tridge@samba.org>2011-10-04 15:08:57 +1100
commitf469369fdf71b52930fdcc1f68632a727db38fc1 (patch)
tree89c5a13dc9064176be7e83ce7328094db8593f4f /source4/dsdb
parent6b69ecd0293d827b7429cfd75cf4a13ab4e40ce5 (diff)
downloadsamba-f469369fdf71b52930fdcc1f68632a727db38fc1.tar.gz
samba-f469369fdf71b52930fdcc1f68632a727db38fc1.tar.bz2
samba-f469369fdf71b52930fdcc1f68632a727db38fc1.zip
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
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c9
1 files changed, 9 insertions, 0 deletions
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);
}