summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2014-03-26 11:45:21 +0200
committerKarolin Seeger <kseeger@samba.org>2014-05-20 11:47:42 +0200
commit93979e068c7556f685381ed29a3a95f049035a81 (patch)
tree56b8d7c2a725bebc3fa8f6b9d41d7e213d8f3d6a /source3
parent59d9a2766f88bf019170ed71a67e91e11596061c (diff)
downloadsamba-93979e068c7556f685381ed29a3a95f049035a81.tar.gz
winbindd: use exit_daemon() to pass startup status to systemd
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 91013315c9fa946bf85c85df0ccd40a803f3dc6f)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 61c1dbc6e8..68ffd7e03e 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1543,8 +1543,7 @@ int main(int argc, char **argv, char **envp)
winbind_event_context(),
false);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("reinit_after_fork() failed\n"));
- exit(1);
+ exit_daemon("Winbindd reinit_after_fork() failed", map_errno_from_nt_status(status));
}
/*
@@ -1554,17 +1553,14 @@ int main(int argc, char **argv, char **envp)
*/
status = init_before_fork();
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("init_before_fork failed: %s\n", nt_errstr(status)));
- exit(1);
+ exit_daemon(nt_errstr(status), map_errno_from_nt_status(status));
}
winbindd_register_handlers(winbind_messaging_context(), !Fork);
status = init_system_session_info();
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("ERROR: failed to setup system user info: %s.\n",
- nt_errstr(status)));
- exit(1);
+ exit_daemon("Winbindd failed to setup system user info", map_errno_from_nt_status(status));
}
rpc_lsarpc_init(NULL);
@@ -1576,8 +1572,7 @@ int main(int argc, char **argv, char **envp)
/* setup listen sockets */
if (!winbindd_setup_listeners()) {
- DEBUG(0,("winbindd_setup_listeners() failed\n"));
- exit(1);
+ exit_daemon("Winbindd failed to setup listeners", EPIPE);
}
TALLOC_FREE(frame);