Replace logsrvd_is_early() with logsrvd_warn_stderr().

This is now defined in logsrvd_conf.c which removes a dependency
on another compilation unit for the fuzzer.
This commit is contained in:
Todd C. Miller
2021-06-16 08:45:29 -06:00
parent 1d41937ca1
commit efaa173fbe
4 changed files with 15 additions and 19 deletions

View File

@@ -87,7 +87,6 @@ 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 bool is_early = true;
/* Event loop callbacks. */
static void client_msg_cb(int fd, int what, void *v);
@@ -1818,18 +1817,13 @@ daemonize(bool nofork)
(void) close(fd);
}
}
is_early = false;
/* Disable logging to stderr after we become a daemon. */
logsrvd_warn_stderr(false);
debug_return;
}
/* The early flag is used to decide whether sudo_warn() goes to stderr too. */
bool
logsrvd_is_early(void)
{
return is_early;
}
static void
usage(bool fatal)
{