1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +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:
Ralph Boehme 2015-04-22 12:00:10 +02:00 committed by Jeremy Allison
parent b4a0864f64
commit 9e7cf87a30
8 changed files with 8 additions and 25 deletions

View File

@ -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"));

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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)));

View File

@ -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)));

View File

@ -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)) {