{
struct imessaging_context *msg;
NTSTATUS status;
-
+ if (state == NULL) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
msg = imessaging_init(state->event_ctx,
lp_ctx,
cluster_id(getpid(), SAMBA_PARENT_TASKID),
state = talloc_zero(NULL, struct server_state);
if (state == NULL) {
exit_daemon("Samba cannot create server state", ENOMEM);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
};
state->binary_name = binary_name;
TALLOC_FREE(state);
exit_daemon("Samba cannot open schannel store "
"for secured NETLOGON operations.", EACCES);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
}
TALLOC_FREE(state);
exit_daemon("Samba failed to disable recusive "
"winbindd calls.", EACCES);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
gensec_init(); /* FIXME: */
if (state->event_ctx == NULL) {
TALLOC_FREE(state);
exit_daemon("Initializing event context failed", EACCES);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
talloc_set_destructor(state->event_ctx, event_ctx_destructor);
TALLOC_FREE(state);
exit_daemon("Samba failed to set standard input handler",
ENOTTY);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
if (S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode)) {
if (fde == NULL) {
TALLOC_FREE(state);
exit_daemon("Initializing stdin failed", ENOMEM);
+ /*
+ * return is never reached but is here to
+ * satisfy static checkers
+ */
+ return 1;
}
}
if (te == NULL) {
TALLOC_FREE(state);
exit_daemon("Maxruntime handler failed", ENOMEM);
- }
+ /*
+ * return is never reached but is here to
+ * satisfy static checkers
+ */
+ return 1;
+ }
}
se = tevent_add_signal(state->event_ctx,
if (se == NULL) {
TALLOC_FREE(state);
exit_daemon("Initialize SIGTERM handler failed", ENOMEM);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
if (lpcfg_server_role(cmdline_lp_ctx) != ROLE_ACTIVE_DIRECTORY_DC
if (ret != LDB_SUCCESS) {
TALLOC_FREE(state);
exit_daemon("Samba failed to prime database", EINVAL);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
if (db_is_backup) {
TALLOC_FREE(state);
exit_daemon("Database is a backup. Please run samba-tool domain"
" backup restore", EINVAL);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
status = setup_parent_messaging(state, cmdline_lp_ctx);
TALLOC_FREE(state);
exit_daemon("Samba failed to setup parent messaging",
NT_STATUS_V(status));
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
DBG_ERR("%s: using '%s' process model\n", binary_name, model);
TALLOC_FREE(state);
exit_daemon("Samba failed to open process control pipe",
errno);
+ /*
+ * return is never reached but is here to satisfy static
+ * checkers
+ */
+ return 1;
}
smb_set_close_on_exec(child_pipe[0]);
smb_set_close_on_exec(child_pipe[1]);
TALLOC_FREE(state);
exit_daemon("Samba failed to start services",
NT_STATUS_V(status));
+ /*
+ * return is never reached but is here to
+ * satisfy static checkers
+ */
+ return 1;
}
}
}