mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3:smbd: use smbd_reinit_after_fork
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
b4a0864f64
commit
9e7cf87a30
@ -373,7 +373,7 @@ pid_t start_background_queue(struct tevent_context *ev,
|
||||
close(pause_pipe[0]);
|
||||
pause_pipe[0] = -1;
|
||||
|
||||
status = reinit_after_fork(msg_ctx, ev, true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev, true);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("reinit_after_fork() failed\n"));
|
||||
|
@ -645,9 +645,7 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx,
|
||||
return pid;
|
||||
}
|
||||
|
||||
status = reinit_after_fork(msg_ctx,
|
||||
ev_ctx,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev_ctx, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("reinit_after_fork() failed\n"));
|
||||
smb_panic("reinit_after_fork() failed");
|
||||
|
@ -162,9 +162,7 @@ void start_epmd(struct tevent_context *ev_ctx,
|
||||
return;
|
||||
}
|
||||
|
||||
status = reinit_after_fork(msg_ctx,
|
||||
ev_ctx,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev_ctx, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("reinit_after_fork() failed\n"));
|
||||
smb_panic("reinit_after_fork() failed");
|
||||
|
@ -171,9 +171,7 @@ void start_fssd(struct tevent_context *ev_ctx,
|
||||
}
|
||||
|
||||
/* child */
|
||||
status = reinit_after_fork(msg_ctx,
|
||||
ev_ctx,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev_ctx, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("reinit_after_fork() failed\n"));
|
||||
smb_panic("reinit_after_fork() failed");
|
||||
|
@ -861,9 +861,7 @@ void start_lsasd(struct tevent_context *ev_ctx,
|
||||
return;
|
||||
}
|
||||
|
||||
status = reinit_after_fork(msg_ctx,
|
||||
ev_ctx,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev_ctx, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("reinit_after_fork() failed\n"));
|
||||
smb_panic("reinit_after_fork() failed");
|
||||
|
@ -3306,9 +3306,7 @@ bool fork_echo_handler(struct smbXsrv_connection *xconn)
|
||||
close(listener_pipe[0]);
|
||||
set_blocking(listener_pipe[1], false);
|
||||
|
||||
status = reinit_after_fork(xconn->msg_ctx,
|
||||
xconn->ev_ctx,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(xconn->msg_ctx, xconn->ev_ctx, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, ("reinit_after_fork failed: %s\n",
|
||||
nt_errstr(status)));
|
||||
|
@ -244,11 +244,9 @@ static bool smbd_scavenger_start(struct smbd_scavenger_state *state)
|
||||
|
||||
close(fds[0]);
|
||||
|
||||
am_parent = NULL;
|
||||
|
||||
set_my_unique_id(unique_id);
|
||||
|
||||
status = reinit_after_fork(state->msg, state->ev, true);
|
||||
status = smbd_reinit_after_fork(state->msg, state->ev, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(2, ("reinit_after_fork failed: %s\n",
|
||||
nt_errstr(status)));
|
||||
|
@ -590,9 +590,6 @@ static void smbd_accept_connection(struct tevent_context *ev,
|
||||
if (pid == 0) {
|
||||
NTSTATUS status = NT_STATUS_OK;
|
||||
|
||||
/* Child code ... */
|
||||
am_parent = NULL;
|
||||
|
||||
/*
|
||||
* Can't use TALLOC_FREE here. Nulling out the argument to it
|
||||
* would overwrite memory we've just freed.
|
||||
@ -606,9 +603,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
|
||||
* them, counting worker smbds. */
|
||||
CatchChild();
|
||||
|
||||
status = reinit_after_fork(msg_ctx,
|
||||
ev,
|
||||
true);
|
||||
status = smbd_reinit_after_fork(msg_ctx, ev, true);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (NT_STATUS_EQUAL(status,
|
||||
NT_STATUS_TOO_MANY_OPENED_FILES)) {
|
||||
|
Loading…
Reference in New Issue
Block a user