diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-18 18:05:55 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-18 18:05:55 -0700 |
commit | e9a589feac531379e569bc39d803b16179002cfa (patch) | |
tree | 81fcaf840fa0ed4513e4d17d6e20f47434ca5ac5 /source4/ldap_server | |
parent | ade5d43c5ceb915dd2210a735a21fd9bed531dd3 (diff) | |
download | samba-e9a589feac531379e569bc39d803b16179002cfa.tar.gz samba-e9a589feac531379e569bc39d803b16179002cfa.tar.xz samba-e9a589feac531379e569bc39d803b16179002cfa.zip |
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.
Diffstat (limited to 'source4/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_server.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index b119620339..344015892e 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); } |