summaryrefslogtreecommitdiff
path: root/source4/dsdb/kcc/kcc_periodic.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-22 11:18:04 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-23 07:17:57 +0000
commitd1cbd68bb12c6d5193e864e5b0bae16c7ec4c5f4 (patch)
treeced813f6563d46fecdd6120c502e05d2c62798c6 /source4/dsdb/kcc/kcc_periodic.c
parentc166b44b4756c2e038ebbbe27898aff0a5c954da (diff)
downloadsamba-d1cbd68bb12c6d5193e864e5b0bae16c7ec4c5f4.tar.gz
samba-d1cbd68bb12c6d5193e864e5b0bae16c7ec4c5f4.tar.bz2
samba-d1cbd68bb12c6d5193e864e5b0bae16c7ec4c5f4.zip
s4-kcc: added service->am_rodc
use a rodc flag on the service instead of calling samdb_rodc each time
Diffstat (limited to 'source4/dsdb/kcc/kcc_periodic.c')
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index c396912aa3..bfb6bdc3a5 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -307,9 +307,12 @@ NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
r1->source_dsa_obj_guid = ntds_guid;
r1->source_dsa_invocation_id = invocation_id;
r1->replica_flags =
- DRSUAPI_DRS_WRIT_REP |
DRSUAPI_DRS_INIT_SYNC |
- DRSUAPI_DRS_PER_SYNC;
+ DRSUAPI_DRS_PER_SYNC |
+ DRSUAPI_DRS_ADD_REF;
+ if (!s->am_rodc) {
+ r1->replica_flags |= DRSUAPI_DRS_WRIT_REP;
+ }
memset(r1->schedule, 0x11, sizeof(r1->schedule));
dsa_conn->servers = talloc_realloc(dsa_conn, dsa_conn->servers,