From 0ca222aa887ee35e034e782b01e3df91e4386523 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 2 Jun 2022 10:59:30 -0600 Subject: [PATCH] Fix inverted logic when setting server_log. A value that starts with a '/' should be treated as a path. --- logsrvd/logsrvd_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logsrvd/logsrvd_conf.c b/logsrvd/logsrvd_conf.c index 25f7655ef..322cdf34d 100644 --- a/logsrvd/logsrvd_conf.c +++ b/logsrvd/logsrvd_conf.c @@ -638,7 +638,7 @@ cb_server_log(struct logsrvd_config *config, const char *str, size_t offset) /* An empty value means to disable the server log. */ if (*str != '\0') { - if (*str != '/') { + if (*str == '/') { log_type = SERVER_LOG_FILE; if ((copy = strdup(str)) == NULL) { sudo_warn(NULL);