2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Fix inverted logic when setting server_log.

A value that starts with a '/' should be treated as a path.
This commit is contained in:
Todd C. Miller 2022-06-02 10:59:30 -06:00
parent bec9603f3a
commit 0ca222aa88

View File

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