From: Stefan Metzmacher Date: Wed, 16 Aug 2023 14:47:24 +0000 (+0200) Subject: s3:rpc_server: call reopen_logs before we print the copyright notice X-Git-Tag: talloc-2.4.2~1259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94723b6732a67482eb7792e82b01e26a807e8265;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/rpc_server/rpc_host.c b/source3/rpc_server/rpc_host.c index 1a1c31cf7fa..432381afb13 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 bbd337805ee..8b614befd16 100644 --- a/source3/rpc_server/rpc_worker.c +++ b/source3/rpc_server/rpc_worker.c @@ -1123,6 +1123,8 @@ int rpc_worker_main( /* Ignore children - no zombies. */ CatchChild(); + reopen_logs(); + DEBUG(0, ("%s version %s started.\n", progname, samba_version_string()));