summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorFernando J V da Silva <fernandojvsilva@yahoo.com.br>2010-04-15 17:39:54 -0300
committerAndrew Tridgell <tridge@samba.org>2010-04-22 19:36:15 +1000
commit59aa0a07d24bfb9ff9795ffe90801577043058a5 (patch)
treee72918e1d9d251607c5fd885460314ee7e2f1b13 /source4/dsdb
parentfbdbd67c7640757f80a2ffd70a17c6ab50491844 (diff)
downloadsamba-59aa0a07d24bfb9ff9795ffe90801577043058a5.tar.gz
samba-59aa0a07d24bfb9ff9795ffe90801577043058a5.tar.bz2
samba-59aa0a07d24bfb9ff9795ffe90801577043058a5.zip
s40-drs: Do not send GetNCChanges messages to RODCs
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index 07fb0b3d62..55357509f0 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -271,6 +271,17 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
struct drsuapi_DsGetNCChanges *r;
struct drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
struct tevent_req *subreq;
+ int ret;
+
+ /* check that the client isn't lying about being a RODC */
+ ret = dsdb_validate_client_flags(service->samdb, rf1);
+ if (ret != LDB_SUCCESS) {
+ return;
+ }
+
+ if ((rf1->replica_flags & DRSUAPI_DRS_WRIT_REP) == 0) {
+ return;
+ }
r = talloc(state, struct drsuapi_DsGetNCChanges);
if (tevent_req_nomem(r, req)) {