From: Ralph Boehme Date: Sat, 3 Dec 2022 15:59:39 +0000 (+0100) Subject: smbd: remove process shortname arg from smbd_reinit_after_fork() X-Git-Tag: talloc-2.4.0~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38ba7d1476c1bdb5bbde70c45b47d12ab1699516;p=thirdparty%2Fsamba.git smbd: remove process shortname arg from smbd_reinit_after_fork() All callers already do this explicitly by calling process_set_title(). Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/include/proto.h b/source3/include/proto.h index 3d3cd93d5bc..4f40470e20f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -305,8 +305,7 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx, const char *comment); NTSTATUS smbd_reinit_after_fork(struct messaging_context *msg_ctx, struct tevent_context *ev_ctx, - bool parent_longlived, - const char *comment); + bool parent_longlived); void *malloc_(size_t size); void *Realloc(void *p, size_t size, bool free_old_on_error); void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size, diff --git a/source3/smbd/scavenger.c b/source3/smbd/scavenger.c index 0d42ae635c2..897ddf1617c 100644 --- a/source3/smbd/scavenger.c +++ b/source3/smbd/scavenger.c @@ -246,7 +246,7 @@ static bool smbd_scavenger_start(struct smbd_scavenger_state *state) close(fds[0]); status = smbd_reinit_after_fork(state->msg, state->ev, - true, "smbd-scavenger"); + true); if (!NT_STATUS_IS_OK(status)) { DEBUG(2, ("reinit_after_fork failed: %s\n", nt_errstr(status))); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 811cdbc3ccd..d442e783381 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -428,7 +428,7 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive, return true; } - status = smbd_reinit_after_fork(msg, ev, true, "smbd-notifyd"); + status = smbd_reinit_after_fork(msg, ev, true); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("%s: reinit_after_fork failed: %s\n", __func__, nt_errstr(status))); @@ -644,7 +644,7 @@ static bool cleanupd_init(struct messaging_context *msg, bool interactive, close(up_pipe[0]); - status = smbd_reinit_after_fork(msg, ev, true, "cleanupd"); + status = smbd_reinit_after_fork(msg, ev, true); if (!NT_STATUS_IS_OK(status)) { DBG_WARNING("reinit_after_fork failed: %s\n", nt_errstr(status)); @@ -1014,7 +1014,7 @@ static void smbd_accept_connection(struct tevent_context *ev, * them, counting worker smbds. */ CatchChild(); - status = smbd_reinit_after_fork(msg_ctx, ev, true, NULL); + 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)) { diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index b4a84e1a3f3..d216fd7e06d 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -252,11 +252,11 @@ void smbd_exit_server_cleanly(const char *const explanation) */ NTSTATUS smbd_reinit_after_fork(struct messaging_context *msg_ctx, struct tevent_context *ev_ctx, - bool parent_longlived, const char *comment) + bool parent_longlived) { NTSTATUS ret; am_parent = NULL; - ret = reinit_after_fork(msg_ctx, ev_ctx, parent_longlived, comment); + ret = reinit_after_fork(msg_ctx, ev_ctx, parent_longlived, NULL); initialize_password_db(true, ev_ctx); return ret; } diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c index c1e0fc2979f..9edfa2116e9 100644 --- a/source3/smbd/smb1_process.c +++ b/source3/smbd/smb1_process.c @@ -2606,8 +2606,7 @@ bool fork_echo_handler(struct smbXsrv_connection *xconn) status = smbd_reinit_after_fork(xconn->client->msg_ctx, xconn->client->raw_ev_ctx, - true, - "smbd-echo"); + true); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("reinit_after_fork failed: %s\n", nt_errstr(status)));