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)
committerJule Anger <janger@samba.org>
Tue, 19 Dec 2023 09:43:08 +0000 (09:43 +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>
(cherry picked from commit 94723b6732a67482eb7792e82b01e26a807e8265)

source3/rpc_server/rpc_host.c
source3/rpc_server/rpc_worker.c

index 1cb874569e249c251bb009a82ece7809e6aba2e7..b59916b5dda88c1dc7e44b1bd38655bb0484c5ba 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 4f47a0ad4f3b8a6fef78496f21e84f8b52b1e1ba..2ef90547dd6661cbac53bce83b6ef70d11ad9b5c 100644 (file)
@@ -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()));