]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: SIGHUP handlers use consistent log level 3
authorJones Syue <jonessyue@qnap.com>
Mon, 2 Sep 2024 09:11:00 +0000 (17:11 +0800)
committerMartin Schwenke <martins@samba.org>
Wed, 25 Sep 2024 01:38:02 +0000 (01:38 +0000)
When turn-on 'log level = 3', sending SIGHUP to samba processes, for
example: smbd parent/children, smbd-notifyd, and smbd-cleanupd. Then
monitor log.smbd in order to parse sighup logs, it looks like the log level
is inconsistent among these processes: smbd parent/children use level 1,
and smbd-notifyd/smbd-cleanupd use level 3.

This patch raises sighup handler's log level from level 1 to level 3, which
is more consistent with smbd-notifyd by Commit 6e5bff80a0a0b ("s3:notifyd:
Handle sigup in notifyd to reparse smb.conf"), and smbd-cleanupd by Commit
57c1e115ecef4 ("smbd: reopen logs on SIGHUP for notifyd and cleanupd").

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15706

Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Sep 25 01:38:02 UTC 2024 on atb-devel-224

source3/printing/queue_process.c
source3/smbd/server.c
source3/smbd/smb2_process.c
source3/winbindd/winbindd_dual.c

index d1e95bb083ad5373442d8787dd66964c6b63c8f4..0f95bd736f2a794d68922488998a73c59ccf64ee 100644 (file)
@@ -221,7 +221,7 @@ static void bq_sig_hup_handler(struct tevent_context *ev,
        state = talloc_get_type_abort(pvt, struct bq_state);
        change_to_root_user();
 
-       DEBUG(1, ("Reloading pcap cache after SIGHUP\n"));
+       DBG_NOTICE("Reloading pcap cache after SIGHUP\n");
        pcap_cache_reload(state->ev, state->msg,
                          reload_pcap_change_notify);
        printing_subsystem_queue_tasks(state);
index b43d654d6a5d2d7a05fb5c8dfaf293102ad8c6fc..e6f8f5849647b64b91a96cec6da6c101c58b6080 100644 (file)
@@ -1432,7 +1432,7 @@ static void smbd_parent_sig_hup_handler(struct tevent_context *ev,
                                        void *private_data)
 {
        change_to_root_user();
-       DEBUG(1,("parent: Reloading services after SIGHUP\n"));
+       DBG_NOTICE("parent: Reloading services after SIGHUP\n");
        reload_services(NULL, NULL, false);
 }
 
index a4a0e8265ad8947a68be4efbb6d3538c15b84d50..6931bfba81c1cb05049238eff2d8746023e3d395 100644 (file)
@@ -1677,7 +1677,7 @@ static void smbd_sig_hup_handler(struct tevent_context *ev,
                struct smbd_server_connection);
 
        change_to_root_user();
-       DEBUG(1,("Reloading services after SIGHUP\n"));
+       DBG_NOTICE("Reloading services after SIGHUP\n");
        reload_services(sconn, conn_snum_used, false);
 }
 
index fdb66d0e1c7b4ab11ee3bd97b7a6de7312143547..d4e1995f9280ba6ee5f5ec2bc1084c07923fa724 100644 (file)
@@ -2062,7 +2062,7 @@ static void winbindd_sig_hup_handler(struct tevent_context *ev,
 {
        const char *file = (const char *)private_data;
 
-       DEBUG(1,("Reloading services after SIGHUP\n"));
+       DBG_NOTICE("Reloading services after SIGHUP\n");
        flush_caches_noinit();
        winbindd_reload_services_file(file);
 }