1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

s3: SIGHUP handlers use consistent log level 3

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

(cherry picked from commit 4f3dfb2029c667b6dcd43223fe154dca59143e95)

Autobuild-User(v4-21-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-21-test): Fri Oct  4 10:13:17 UTC 2024 on atb-devel-224
This commit is contained in:
Jones Syue 2024-09-02 17:11:00 +08:00 committed by Jule Anger
parent 8fa36e029b
commit bbfc736f26
4 changed files with 4 additions and 4 deletions

@ -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);

@ -1426,7 +1426,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);
}

@ -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);
}

@ -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);
}