diff options
author | Fernando J V da Silva <fernandojvsilva@yahoo.com.br> | 2010-04-15 17:37:40 -0300 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-22 19:36:15 +1000 |
commit | 57bcdf008fa44d4c550819cbceada968b11be63c (patch) | |
tree | c404018cef84c2e07b26a48f7618cfa31b76c622 /source4/dsdb/repl/drepl_service.c | |
parent | c023fc217ed370e5c890c1984da533e0133060d9 (diff) | |
download | samba-57bcdf008fa44d4c550819cbceada968b11be63c.tar.gz samba-57bcdf008fa44d4c550819cbceada968b11be63c.tar.bz2 samba-57bcdf008fa44d4c550819cbceada968b11be63c.zip |
s4-drs: samdb_is_rodc() function and new samdb_rodc() function
This patch creates the samdb_is_rodc() function, which looks for
the NTDSDSA object for a DC that has a specific invocationId
and if msDS-isRODC is present on such object and it is TRUE, then
consider the DC as a RODC.
The new samdb_rodc() function uses the samdb_is_rodc() function
for the local server.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/dsdb/repl/drepl_service.c')
-rw-r--r-- | source4/dsdb/repl/drepl_service.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index 4196f94234..59436d6c0c 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -132,6 +132,8 @@ static void dreplsrv_task_init(struct task_server *task) WERROR status; struct dreplsrv_service *service; uint32_t periodic_startup_interval; + bool am_rodc; + int ret; switch (lp_server_role(task->lp_ctx)) { case ROLE_STANDALONE: @@ -194,7 +196,8 @@ static void dreplsrv_task_init(struct task_server *task) } /* if we are a RODC then we do not send DSReplicaSync*/ - if (!samdb_rodc(service->samdb)) { + ret = samdb_rodc(service->samdb, &am_rodc); + if (ret == LDB_SUCCESS && !am_rodc) { service->notify.interval = lp_parm_int(task->lp_ctx, NULL, "dreplsrv", "notify_interval", 5); /* in seconds */ status = dreplsrv_notify_schedule(service, service->notify.interval); |