From ce92674cc20a7ae6c2d18acba6ac78304fc16a69 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 8 Apr 2020 10:19:55 -0600 Subject: [PATCH] Reload sudo.conf upon SIGUP This makes it possible to update the Debug settings in sudo.conf and have them take effect on reload. --- logsrvd/logsrvd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/logsrvd/logsrvd.c b/logsrvd/logsrvd.c index 26c9b421a..72227a0f4 100644 --- a/logsrvd/logsrvd.c +++ b/logsrvd/logsrvd.c @@ -1606,6 +1606,12 @@ server_reload(struct sudo_event_base *base) /* Re-initialize listeners and TLS context. */ if (!server_setup(base)) sudo_fatalx(U_("unable setup listen socket")); + + /* Re-initialize debugging. */ + if (sudo_conf_read(NULL, SUDO_CONF_DEBUG) != -1) { + sudo_debug_register(getprogname(), NULL, NULL, + sudo_conf_debug_files(getprogname())); + } } debug_return;