]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: explicitly call process_set_title()
authorRalph Boehme <slow@samba.org>
Sat, 3 Dec 2022 15:56:20 +0000 (16:56 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 14 Dec 2022 01:38:29 +0000 (01:38 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/scavenger.c
source3/smbd/server.c
source3/smbd/smb1_process.c

index fe47c22e05ffde3d2a3115e698ec1b693641668b..0d42ae635c2fdda0189e8514d5678b46bf092180 100644 (file)
@@ -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;
index 7e0ee39b87ddb33827def1a7b311418be44d0522..811cdbc3ccd9dc1aa9129b05b03cbc7144ee5619 100644 (file)
@@ -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,
index 140884adb96b2bbca9dc2faf7674c91a9cd24891..c1e0fc2979f4c9ababc5a6a0f710ac08d4e33777 100644 (file)
@@ -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);