1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4-drs: If we are a RODC then do not send DSReplicaSync messages

This commit is contained in:
Fernando J V da Silva 2010-03-24 13:02:36 -03:00 committed by Andrew Tridgell
parent 088096d1ba
commit 8e1d947787

View File

@ -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");