summaryrefslogtreecommitdiff
path: root/source4/rpc_server/service_rpc.c
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@suse.de>2019-02-05 18:54:02 +0100
committerAndrew Bartlett <abartlet@samba.org>2019-12-12 00:35:30 +0000
commit39dfc5c82b2345f2eee7d14f6f2cc3ee8b2aef3d (patch)
tree8e4e63eabf3872025d92e4b9796c8d172e2de1ee /source4/rpc_server/service_rpc.c
parentfee5c6a4247aeac71318186bbff7708d25de5912 (diff)
downloadsamba-39dfc5c82b2345f2eee7d14f6f2cc3ee8b2aef3d.tar.gz
librpc:core: Split dcesrv context init and endpoint servers init
The S4 server will initialize the endpoint servers specified in smb.conf, but the S3 server need to initialize all registered endpoint servers (the embedded ones). Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/rpc_server/service_rpc.c')
-rw-r--r--source4/rpc_server/service_rpc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index ef4bfab237a..96ebc2dbe57 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -129,6 +129,7 @@ static NTSTATUS dcesrv_task_init(struct task_server *task)
{
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
struct dcesrv_context *dce_ctx;
+ const char **ep_servers = NULL;
dcerpc_server_init(task->lp_ctx);
@@ -136,13 +137,18 @@ static NTSTATUS dcesrv_task_init(struct task_server *task)
status = dcesrv_init_context(task->event_ctx,
task->lp_ctx,
- lpcfg_dcerpc_endpoint_servers(task->lp_ctx),
&srv_callbacks,
&dce_ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+ ep_servers = lpcfg_dcerpc_endpoint_servers(task->lp_ctx);
+ status = dcesrv_init_ep_servers(dce_ctx, ep_servers);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
/* Make sure the directory for NCALRPC exists */
if (!directory_exist(lpcfg_ncalrpc_dir(task->lp_ctx))) {
mkdir(lpcfg_ncalrpc_dir(task->lp_ctx), 0755);