From 3d3cc1bd68f5c3495e167a8f939cf0b986038ccb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 16 Aug 2023 16:47:24 +0200 Subject: [PATCH] s3:rpc_server: call reopen_logs before we print the copyright notice This matches what we do in smbd, winbindd and nmbd. For the workers it's important to call it at all, otherwise things like 'debug pid = yes' or 'debug class = yes' have no effect in the workers. We could argue if we want the copyright notice on the start of each worker at all, but that's a different discussion... Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit 94723b6732a67482eb7792e82b01e26a807e8265) --- source3/rpc_server/rpc_host.c | 4 ++-- source3/rpc_server/rpc_worker.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/rpc_host.c b/source3/rpc_server/rpc_host.c index 1cb874569e2..b59916b5dda 100644 --- a/source3/rpc_server/rpc_host.c +++ b/source3/rpc_server/rpc_host.c @@ -2838,13 +2838,13 @@ int main(int argc, const char *argv[]) dump_core_setup(progname, lp_logfile(frame, lp_sub)); + reopen_logs(); + DEBUG(0, ("%s version %s started.\n", progname, samba_version_string())); DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE)); - reopen_logs(); - (void)winbind_off(); ok = init_guest_session_info(frame); (void)winbind_on(); diff --git a/source3/rpc_server/rpc_worker.c b/source3/rpc_server/rpc_worker.c index 4f47a0ad4f3..2ef90547dd6 100644 --- a/source3/rpc_server/rpc_worker.c +++ b/source3/rpc_server/rpc_worker.c @@ -1122,6 +1122,8 @@ int rpc_worker_main( /* Ignore children - no zombies. */ CatchChild(); + reopen_logs(); + DEBUG(0, ("%s version %s started.\n", progname, samba_version_string())); -- 2.11.4.GIT