s3:rpc_server: call reopen_logs before we print the copyright notice
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Aug 2023 14:47:24 +0000 (16:47 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 17 Oct 2023 19:20:38 +0000 (19:20 +0000)
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 <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_server/rpc_host.c
source3/rpc_server/rpc_worker.c

index 1a1c31cf7faa2feb818985c9ebb9b8ccb8e674a5..432381afb131efad8d20b8835992a5153d958b6b 100644 (file)
@@ -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();
index bbd337805ee9476228291d5a476dbafaa854d04e..8b614befd169077d1c8eb4b69df21c5289c3ca08 100644 (file)
@@ -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()));