summaryrefslogtreecommitdiff
path: root/logsrvd/logsrvd.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2023-05-02 10:37:38 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2023-05-02 10:37:38 -0600
commitd4c33b71898c9f4b122815c6826ad5cc8a69ff60 (patch)
treeffcee8f87a7ac8c5733b48925f19c6d60984382b /logsrvd/logsrvd.c
parentb3a0d009b185e599622d4722010ae0278eeee5fc (diff)
downloadsudo-d4c33b71898c9f4b122815c6826ad5cc8a69ff60.tar.gz
Convert config file paths to colon-separated path list.
This means that _PATH_SUDO_CONF, _PATH_SUDOERS, _PATH_SUDO_LOGSRVD_CONF, and _PATH_CVTSUDOERS_CONF can now specify multiple files. The first file that exists is used.
Diffstat (limited to 'logsrvd/logsrvd.c')
-rw-r--r--logsrvd/logsrvd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/logsrvd/logsrvd.c b/logsrvd/logsrvd.c
index 891ce8115..25c94fc3d 100644
--- a/logsrvd/logsrvd.c
+++ b/logsrvd/logsrvd.c
@@ -85,7 +85,7 @@ TAILQ_HEAD(connection_list, connection_closure);
static struct connection_list connections = TAILQ_HEAD_INITIALIZER(connections);
static struct listener_list listeners = TAILQ_HEAD_INITIALIZER(listeners);
static const char server_id[] = "Sudo Audit Server " PACKAGE_VERSION;
-static const char *conf_file = _PATH_SUDO_LOGSRVD_CONF;
+static const char *conf_file = NULL;
/* Event loop callbacks. */
static void client_msg_cb(int fd, int what, void *v);
@@ -1671,7 +1671,8 @@ server_dump_stats(void)
debug_decl(server_dump_stats, SUDO_DEBUG_UTIL);
sudo_debug_printf(SUDO_DEBUG_INFO, "%s", server_id);
- sudo_debug_printf(SUDO_DEBUG_INFO, "configuration file: %s", conf_file);
+ sudo_debug_printf(SUDO_DEBUG_INFO, "configuration file: %s",
+ conf_file ? conf_file : _PATH_SUDO_LOGSRVD_CONF);
sudo_debug_printf(SUDO_DEBUG_INFO, "listen addresses:");
n = 0;