From 096295a6fe348937a8f23b5064f14896b59e35e6 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 1 Dec 2022 18:18:29 +0100 Subject: [PATCH] winbindd: Use process_set_title() instead of setproctitle() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/winbindd/winbindd.c | 3 ++- source3/winbindd/winbindd_dual.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 6796b07bca3d..e0c10501c6cc 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -53,6 +53,7 @@ #include "lib/global_contexts.h" #include "source3/lib/substitute.h" #include "winbindd_traceid.h" +#include "lib/util/util_process.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -257,7 +258,7 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx, /* install default SIGCHLD handler: validation code uses fork/waitpid */ CatchSignal(SIGCHLD, SIG_DFL); - setproctitle("validate cache child"); + process_set_title("wb: check cache", "validate cache child"); ret = (uint8_t)winbindd_validate_cache_nobackup(); DEBUG(10, ("winbindd_msg_validata_cache: got return value %d\n", ret)); diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index fe855045fa82..14627920ab01 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -48,6 +48,7 @@ #include "libcli/auth/netlogon_creds_cli.h" #include "../lib/util/pidfile.h" #include "librpc/gen_ndr/ndr_winbind_c.h" +#include "lib/util/util_process.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -1762,9 +1763,9 @@ static bool fork_domain_child(struct winbindd_child *child) } if (child_domain != NULL) { - setproctitle("domain child [%s]", child_domain->name); + process_set_title("wb[%s]", "domain child [%s]", child_domain->name); } else if (is_idmap_child(child)) { - setproctitle("idmap child"); + process_set_title("wb-idmap", "idmap child"); } /* Handle online/offline messages. */