1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

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>
This commit is contained in:
Alexander Bokovoy 2014-03-26 11:45:21 +02:00 committed by Jeremy Allison
parent 6771c23aa0
commit 7496954a94

View File

@ -1551,8 +1551,7 @@ int main(int argc, const char **argv)
winbind_event_context(), winbind_event_context(),
false); false);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("reinit_after_fork() failed\n")); exit_daemon("Winbindd reinit_after_fork() failed", map_errno_from_nt_status(status));
exit(1);
} }
/* /*
@ -1562,17 +1561,14 @@ int main(int argc, const char **argv)
*/ */
status = init_before_fork(); status = init_before_fork();
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("init_before_fork failed: %s\n", nt_errstr(status))); exit_daemon(nt_errstr(status), map_errno_from_nt_status(status));
exit(1);
} }
winbindd_register_handlers(winbind_messaging_context(), !Fork); winbindd_register_handlers(winbind_messaging_context(), !Fork);
status = init_system_session_info(); status = init_system_session_info();
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("ERROR: failed to setup system user info: %s.\n", exit_daemon("Winbindd failed to setup system user info", map_errno_from_nt_status(status));
nt_errstr(status)));
exit(1);
} }
rpc_lsarpc_init(NULL); rpc_lsarpc_init(NULL);
@ -1584,8 +1580,7 @@ int main(int argc, const char **argv)
/* setup listen sockets */ /* setup listen sockets */
if (!winbindd_setup_listeners()) { if (!winbindd_setup_listeners()) {
DEBUG(0,("winbindd_setup_listeners() failed\n")); exit_daemon("Winbindd failed to setup listeners", EPIPE);
exit(1);
} }
TALLOC_FREE(frame); TALLOC_FREE(frame);