diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-21 19:57:27 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-22 17:10:05 -0700 |
commit | a30d6130869239a6d6160c50908092e1d1424af5 (patch) | |
tree | 7b666982e4ba0594f57e5dc6ae0ea737d72d1aa5 /source4/rpc_server | |
parent | 5d16b9c1bf3476ce24a48bd2796111e7e27c2064 (diff) | |
download | samba-a30d6130869239a6d6160c50908092e1d1424af5.tar.gz samba-a30d6130869239a6d6160c50908092e1d1424af5.tar.bz2 samba-a30d6130869239a6d6160c50908092e1d1424af5.zip |
s4-rpcserver: run all RPC operations in a single task
This will make it much easier to implement shared handles with
association groups. It also means we can shared the ldb between RPC
connections.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/service_rpc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index 64c6728322..ea416894d0 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -39,6 +39,7 @@ #include "../lib/util/tevent_ntstatus.h" #include "libcli/raw/smb.h" #include "../libcli/named_pipe_auth/npa_tstream.h" +#include "smbd/process_model.h" struct dcesrv_socket_context { const struct dcesrv_endpoint *endpoint; @@ -685,11 +686,17 @@ static void dcesrv_task_init(struct task_server *task) NTSTATUS status; struct dcesrv_context *dce_ctx; struct dcesrv_endpoint *e; + const struct model_ops *model_ops; dcerpc_server_init(task->lp_ctx); task_server_set_title(task, "task[dcesrv]"); + /* run the rpc server as a single process to allow for shard + * handles, and sharing of ldb contexts */ + model_ops = process_model_startup(task->event_ctx, "single"); + if (!model_ops) goto failed; + status = dcesrv_init_context(task->event_ctx, task->lp_ctx, lp_dcerpc_endpoint_servers(task->lp_ctx), @@ -702,7 +709,7 @@ static void dcesrv_task_init(struct task_server *task) } for (e=dce_ctx->endpoint_list;e;e=e->next) { - status = dcesrv_add_ep(dce_ctx, task->lp_ctx, e, task->event_ctx, task->model_ops); + status = dcesrv_add_ep(dce_ctx, task->lp_ctx, e, task->event_ctx, model_ops); if (!NT_STATUS_IS_OK(status)) goto failed; } |