summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-15 20:54:09 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-16 07:24:01 +1000
commit3b87e3e95179c527a7fce7e5ed6cb1d33345a2ff (patch)
treeb4364845ee2d2d0570da50773488f9083f1f7cdb /source4/dsdb
parent05ec123b3b159dade51980f3c4bf8662502bb38e (diff)
downloadsamba-3b87e3e95179c527a7fce7e5ed6cb1d33345a2ff.tar.gz
samba-3b87e3e95179c527a7fce7e5ed6cb1d33345a2ff.tar.bz2
samba-3b87e3e95179c527a7fce7e5ed6cb1d33345a2ff.zip
s4-repl: if we are an RODC don't set WRIT_REP in replication
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index a531ecae4a..60c4a66345 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -310,6 +310,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
struct tevent_req *subreq;
struct drsuapi_DsPartialAttributeSet *pas = NULL;
NTSTATUS status;
+ uint32_t replica_flags;
if ((rf1->replica_flags & DRSUAPI_DRS_WRIT_REP) == 0 &&
state->op->extended_op == DRSUAPI_EXOP_NONE) {
@@ -340,6 +341,8 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
uptodateness_vector = &partition->uptodatevector_ex;
}
+ replica_flags = rf1->replica_flags;
+
if (service->am_rodc) {
bool for_schema = false;
if (ldb_dn_compare_base(ldb_get_schema_basedn(service->samdb), partition->dn) == 0) {
@@ -351,6 +354,8 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
DEBUG(0,(__location__ ": Failed to construct partial attribute set : %s\n", nt_errstr(status)));
return;
}
+
+ replica_flags &= ~DRSUAPI_DRS_WRIT_REP;
}
r->in.bind_handle = &drsuapi->bind_handle;
@@ -361,7 +366,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
r->in.req->req8.naming_context = &partition->nc;
r->in.req->req8.highwatermark = rf1->highwatermark;
r->in.req->req8.uptodateness_vector = uptodateness_vector;
- r->in.req->req8.replica_flags = rf1->replica_flags;
+ r->in.req->req8.replica_flags = replica_flags;
r->in.req->req8.max_object_count = 133;
r->in.req->req8.max_ndr_size = 1336811;
r->in.req->req8.extended_op = state->op->extended_op;
@@ -377,7 +382,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
r->in.req->req5.naming_context = &partition->nc;
r->in.req->req5.highwatermark = rf1->highwatermark;
r->in.req->req5.uptodateness_vector = uptodateness_vector;
- r->in.req->req5.replica_flags = rf1->replica_flags;
+ r->in.req->req5.replica_flags = replica_flags;
r->in.req->req5.max_object_count = 133;
r->in.req->req5.max_ndr_size = 1336770;
r->in.req->req5.extended_op = state->op->extended_op;