summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-08-25 00:26:28 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-10 13:08:18 +0300
commit0229ac455dbe3125d72c0371d03c592b460526f3 (patch)
tree71dfe947517c3e41561acc345d49c60d9147137f /source4/dsdb/repl
parent657b7039c38e97af9dbacafb5ab7a5966f52eaea (diff)
downloadsamba-0229ac455dbe3125d72c0371d03c592b460526f3.tar.gz
samba-0229ac455dbe3125d72c0371d03c592b460526f3.tar.bz2
samba-0229ac455dbe3125d72c0371d03c592b460526f3.zip
s4-irpc: Added internal rpc call DREPL_TAKEFSMOROLE
It schedules a getncchanges with extended op 6, to be used when a modify request on becomeROLEMaster atteibute on rootDSE is received.
Diffstat (limited to 'source4/dsdb/repl')
-rw-r--r--source4/dsdb/repl/drepl_service.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index da0d9e5e79..1423827847 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -74,7 +74,6 @@ static WERROR dreplsrv_connect_samdb(struct dreplsrv_service *service, struct lo
if (!ntds_guid) {
return WERR_DS_UNAVAILABLE;
}
-
service->ntds_guid = *ntds_guid;
bind_info28 = &service->bind_info28;
@@ -343,6 +342,15 @@ static NTSTATUS dreplsrv_refresh(struct irpc_message *msg,
return NT_STATUS_OK;
}
+static NTSTATUS drepl_take_FSMO_role(struct irpc_message *msg,
+ struct drepl_takeFSMORole *r)
+{
+ struct dreplsrv_service *service = talloc_get_type(msg->private_data,
+ struct dreplsrv_service);
+ r->out.result = werror_to_ntstatus(dreplsrv_fsmo_role_check(service, r->in.role));
+ return NT_STATUS_OK;
+}
+
/*
startup the dsdb replicator service task
*/
@@ -432,6 +440,7 @@ static void dreplsrv_task_init(struct task_server *task)
IRPC_REGISTER(task->msg_ctx, irpc, DREPLSRV_REFRESH, dreplsrv_refresh, service);
IRPC_REGISTER(task->msg_ctx, drsuapi, DRSUAPI_DSREPLICASYNC, drepl_replica_sync, service);
+ IRPC_REGISTER(task->msg_ctx, irpc, DREPL_TAKEFSMOROLE, drepl_take_FSMO_role, service);
messaging_register(task->msg_ctx, service, MSG_DREPL_ALLOCATE_RID, dreplsrv_allocate_rid);
}