From ad719d06be400d4515429ee4b0e3d838fed7d68c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 1 Feb 2022 13:08:40 -0700 Subject: [PATCH] Fix parsing of "retry_interval" in the relay section. The setting was present but the callback was missing so it could not be parsed in the conf file. --- logsrvd/logsrvd_conf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/logsrvd/logsrvd_conf.c b/logsrvd/logsrvd_conf.c index 3563e17fe..25f7655ef 100644 --- a/logsrvd/logsrvd_conf.c +++ b/logsrvd/logsrvd_conf.c @@ -830,6 +830,22 @@ cb_relay_dir(struct logsrvd_config *config, const char *str, size_t offset) debug_return_bool(true); } +static bool +cb_retry_interval(struct logsrvd_config *config, const char *str, size_t offset) +{ + time_t interval; + const char *errstr; + debug_decl(cb_retry_interval, SUDO_DEBUG_UTIL); + + interval = sudo_strtonum(str, 0, TIME_T_MAX, &errstr); + if (errstr != NULL) + debug_return_bool(false); + + config->relay.retry_interval = interval; + + debug_return_bool(true); +} + static bool cb_relay_store_first(struct logsrvd_config *config, const char *str, size_t offset) { @@ -1087,6 +1103,7 @@ static struct logsrvd_config_entry relay_conf_entries[] = { { "timeout", cb_relay_timeout }, { "connect_timeout", cb_relay_connect_timeout }, { "relay_dir", cb_relay_dir }, + { "retry_interval", cb_retry_interval }, { "store_first", cb_relay_store_first }, { "tcp_keepalive", cb_relay_keepalive }, #if defined(HAVE_OPENSSL)