From ef7f4a142068757dcf0dc11c5b7cf03755be45a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Nov 2010 10:12:22 +1100 Subject: 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 --- source4/ntp_signd/ntp_signd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/ntp_signd/ntp_signd.c') diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c index a0dd2d3065..71b9a9dbc2 100644 --- a/source4/ntp_signd/ntp_signd.c +++ b/source4/ntp_signd/ntp_signd.c @@ -528,7 +528,8 @@ static void ntp_signd_task_init(struct task_server *task) address = talloc_asprintf(ntp_signd, "%s/socket", lpcfg_ntp_signd_socket_directory(task->lp_ctx)); - status = stream_setup_socket(ntp_signd->task->event_ctx, + status = stream_setup_socket(ntp_signd->task, + ntp_signd->task->event_ctx, ntp_signd->task->lp_ctx, model_ops, &ntp_signd_stream_ops, -- cgit