s4-rodc: use the rodc_replica flag on the partition
authorAndrew Tridgell <tridge@samba.org>
Thu, 6 Oct 2011 00:24:28 +0000 (11:24 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 6 Oct 2011 03:34:21 +0000 (14:34 +1100)
this sets DSDB_REPL_FLAG_PARTIAL_REPLICA when replicating a RODC
partition, which tells the replication code to map instanceType to
remove the INSTANCE_TYPE_WRITE bit

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/repl/drepl_out_helpers.c

index 7cb642ab5daa6a5f08797587d151d24aa9c67637..71d2c3bc512079dabd96a9a1beb5daf3d94e6c5b 100644 (file)
@@ -424,7 +424,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
                        return;
                }
                replica_flags &= ~DRSUAPI_DRS_WRIT_REP;
-       } else if (service->am_rodc) {
+       } else if (partition->rodc_replica) {
                bool for_schema = false;
                if (ldb_dn_compare_base(ldb_get_schema_basedn(service->samdb), partition->dn) == 0) {
                        for_schema = true;
@@ -675,7 +675,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
                }
        }
 
-       if (partition->partial_replica) {
+       if (partition->partial_replica || partition->rodc_replica) {
                dsdb_repl_flags |= DSDB_REPL_FLAG_PARTIAL_REPLICA;
        }
        if (state->op->options & DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS) {