From: Ralph Boehme Date: Sat, 3 Dec 2022 15:56:20 +0000 (+0100) Subject: smbd: explicitly call process_set_title() X-Git-Tag: talloc-2.4.0~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62cc0bbab0a5146f7fdc8b3865b662b0f55f89d2;p=thirdparty%2Fsamba.git smbd: explicitly call process_set_title() Currently setting the shortname is achieved via the final arg to smbd_reinit_after_fork(), but I'm going to remove that arg soon. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/scavenger.c b/source3/smbd/scavenger.c index fe47c22e05f..0d42ae635c2 100644 --- a/source3/smbd/scavenger.c +++ b/source3/smbd/scavenger.c @@ -254,6 +254,7 @@ static bool smbd_scavenger_start(struct smbd_scavenger_state *state) return false; } + process_set_title("smbd-scavenger", "scavenger"); reopen_logs(); state->am_scavenger = true; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 7e0ee39b87d..811cdbc3ccd 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -435,6 +435,8 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive, exit(1); } + process_set_title("smbd-notifyd", "notifyd"); + reopen_logs(); /* Set up sighup handler for notifyd */ @@ -652,6 +654,8 @@ static bool cleanupd_init(struct messaging_context *msg, bool interactive, exit(1); } + process_set_title("smbd-cleanupd", "cleanupd"); + se = tevent_add_signal(ev, ev, SIGHUP, diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c index 140884adb96..c1e0fc2979f 100644 --- a/source3/smbd/smb1_process.c +++ b/source3/smbd/smb1_process.c @@ -47,6 +47,7 @@ #include "libcli/smb/smbXcli_base.h" #include "lib/util/time_basic.h" #include "source3/lib/substitute.h" +#include "lib/util/util_process.h" /* Internal message queue for deferred opens. */ struct pending_message_list { @@ -2612,6 +2613,7 @@ bool fork_echo_handler(struct smbXsrv_connection *xconn) nt_errstr(status))); exit(1); } + process_set_title("smbd-echo", "echo handler"); initialize_password_db(true, xconn->client->raw_ev_ctx); smbd_echo_loop(xconn, listener_pipe[1]); exit(0);