summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorFernando J V da Silva <fernandojvsilva@yahoo.com.br>2010-03-24 13:02:36 -0300
committerAndrew Tridgell <tridge@samba.org>2010-03-25 15:02:19 +1100
commit8e1d94778702ac2ab18983abac630957d8782cf6 (patch)
tree9015427f34bb683ed3dfe6e4c836e566a3b5a94b /source4
parent088096d1bad51428a2e2d487214995d4fdfc7ccc (diff)
downloadsamba-8e1d94778702ac2ab18983abac630957d8782cf6.tar.gz
samba-8e1d94778702ac2ab18983abac630957d8782cf6.tar.bz2
samba-8e1d94778702ac2ab18983abac630957d8782cf6.zip
s4-drs: If we are a RODC then do not send DSReplicaSync messages
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/repl/drepl_service.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index 3ed588566f..4196f94234 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -193,14 +193,17 @@ static void dreplsrv_task_init(struct task_server *task)
return;
}
- service->notify.interval = lp_parm_int(task->lp_ctx, NULL, "dreplsrv",
- "notify_interval", 5); /* in seconds */
- status = dreplsrv_notify_schedule(service, service->notify.interval);
- if (!W_ERROR_IS_OK(status)) {
- task_server_terminate(task, talloc_asprintf(task,
- "dreplsrv: Failed to setup notify schedule: %s\n",
- win_errstr(status)), true);
- return;
+ /* if we are a RODC then we do not send DSReplicaSync*/
+ if (!samdb_rodc(service->samdb)) {
+ service->notify.interval = lp_parm_int(task->lp_ctx, NULL, "dreplsrv",
+ "notify_interval", 5); /* in seconds */
+ status = dreplsrv_notify_schedule(service, service->notify.interval);
+ if (!W_ERROR_IS_OK(status)) {
+ task_server_terminate(task, talloc_asprintf(task,
+ "dreplsrv: Failed to setup notify schedule: %s\n",
+ win_errstr(status)), true);
+ return;
+ }
}
irpc_add_name(task->msg_ctx, "dreplsrv");