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/ldap_server/ldap_server.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/ldap_server/ldap_server.c') diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index b119620339b..344015892e9 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -568,10 +568,12 @@ static void ldapsrv_task_init(struct task_server *task) switch (lp_server_role(task->lp_ctx)) { case ROLE_STANDALONE: - task_server_terminate(task, "ldap_server: no LDAP server required in standalone configuration"); + task_server_terminate(task, "ldap_server: no LDAP server required in standalone configuration", + false); return; case ROLE_DOMAIN_MEMBER: - task_server_terminate(task, "ldap_server: no LDAP server required in member server configuration"); + task_server_terminate(task, "ldap_server: no LDAP server required in member server configuration", + false); return; case ROLE_DOMAIN_CONTROLLER: /* Yes, we want an LDAP server */ @@ -642,7 +644,7 @@ static void ldapsrv_task_init(struct task_server *task) */ if (!directory_create_or_exist(priv_dir, geteuid(), 0750)) { task_server_terminate(task, "Cannot create ldap " - "privileged ldapi directory"); + "privileged ldapi directory", true); return; } ldapi_path = talloc_asprintf(ldap_service, "%s/ldapi", priv_dir); @@ -666,7 +668,7 @@ static void ldapsrv_task_init(struct task_server *task) return; failed: - task_server_terminate(task, "Failed to startup ldap server task"); + task_server_terminate(task, "Failed to startup ldap server task", true); } -- cgit v1.2.1