From e9a589feac531379e569bc39d803b16179002cfa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Sep 2009 18:05:55 -0700 Subject: s4-server: kill main daemon if a task fails to initialise When one of our core tasks fails to initialise it can now ask for the server as a whole to die, rather than limping along in a degraded state. --- source4/ntp_signd/ntp_signd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/ntp_signd') diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c index 8ea7fe4ff9..a9c6769821 100644 --- a/source4/ntp_signd/ntp_signd.c +++ b/source4/ntp_signd/ntp_signd.c @@ -347,7 +347,7 @@ static void ntp_signd_task_init(struct task_server *task) char *error = talloc_asprintf(task, "Cannot create NTP signd pipe directory: %s", lp_ntp_signd_socket_directory(task->lp_ctx)); task_server_terminate(task, - error); + error, true); return; } @@ -364,7 +364,7 @@ static void ntp_signd_task_init(struct task_server *task) ntp_signd = talloc(task, struct ntp_signd_server); if (ntp_signd == NULL) { - task_server_terminate(task, "ntp_signd: out of memory"); + task_server_terminate(task, "ntp_signd: out of memory", true); return; } @@ -373,7 +373,7 @@ static void ntp_signd_task_init(struct task_server *task) /* Must be system to get at the password hashes */ ntp_signd->samdb = samdb_connect(ntp_signd, task->event_ctx, task->lp_ctx, system_session(ntp_signd, task->lp_ctx)); if (ntp_signd->samdb == NULL) { - task_server_terminate(task, "ntp_signd failed to open samdb"); + task_server_terminate(task, "ntp_signd failed to open samdb", true); return; } -- cgit