summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-15 10:12:22 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-15 10:19:34 +1100
commitef7f4a142068757dcf0dc11c5b7cf03755be45a8 (patch)
treed8e56b44df249b52da8d913f92293ac39d45be35 /source4/rpc_server
parentec590fc9e37c38891bdd10aaae5bac46f5e71f75 (diff)
downloadsamba-ef7f4a142068757dcf0dc11c5b7cf03755be45a8.tar.gz
samba-ef7f4a142068757dcf0dc11c5b7cf03755be45a8.tar.bz2
samba-ef7f4a142068757dcf0dc11c5b7cf03755be45a8.zip
s4-server: make server sockets a child of the task context
We previously allocated sockets as direct children of the event context. That led to crashes if a service called task_server_terminate(), as it left the socket open and handling events for a dead protocol. Making them a child of the task allows the task to terminate and take all its sockets with it. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcerpc_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 061d8e80b2..1371ad9b36 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -1538,7 +1538,7 @@ static NTSTATUS dcesrv_add_ep_unix(struct dcesrv_context *dce_ctx,
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, lp_ctx,
+ status = stream_setup_socket(dcesrv_sock, event_ctx, lp_ctx,
model_ops, &dcesrv_stream_ops,
"unix", e->ep_description->endpoint, &port,
lpcfg_socket_options(lp_ctx),
@@ -1578,7 +1578,7 @@ static NTSTATUS dcesrv_add_ep_ncalrpc(struct dcesrv_context *dce_ctx,
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, lp_ctx,
+ status = stream_setup_socket(dcesrv_sock, event_ctx, lp_ctx,
model_ops, &dcesrv_stream_ops,
"unix", full_path, &port,
lpcfg_socket_options(lp_ctx),
@@ -1610,7 +1610,7 @@ static NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_ctx,
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = tstream_setup_named_pipe(event_ctx, lp_ctx,
+ status = tstream_setup_named_pipe(dce_ctx, event_ctx, lp_ctx,
model_ops, &dcesrv_stream_ops,
e->ep_description->endpoint,
dcesrv_sock);
@@ -1645,7 +1645,7 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct
dcesrv_sock->endpoint = e;
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
- status = stream_setup_socket(event_ctx, dce_ctx->lp_ctx,
+ status = stream_setup_socket(dcesrv_sock, event_ctx, dce_ctx->lp_ctx,
model_ops, &dcesrv_stream_ops,
"ipv4", address, &port,
lpcfg_socket_options(dce_ctx->lp_ctx),