diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-02-01 13:08:40 -0700 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-02-01 13:08:40 -0700 |
commit | 7ec1950882fe9c24bb2b07694a650b2de69ee5f4 (patch) | |
tree | 3f505918b672cbdb1826d7c111f677985ec379e9 /logsrvd | |
parent | 7558836ef49922ba1308cebabe1f5d2d22f886f6 (diff) | |
download | sudo-7ec1950882fe9c24bb2b07694a650b2de69ee5f4.tar.gz |
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.
Diffstat (limited to 'logsrvd')
-rw-r--r-- | logsrvd/logsrvd_conf.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 @@ -831,6 +831,22 @@ cb_relay_dir(struct logsrvd_config *config, const char *str, size_t offset) } 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) { int val; @@ -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) |