2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Add support for file log line wrapping in libeventlog.

This commit is contained in:
Todd C. Miller
2020-10-26 16:16:46 -06:00
parent d899fe5936
commit fdae4bdbbb
12 changed files with 128 additions and 74 deletions

View File

@@ -1470,6 +1470,16 @@ cb_syslog_maxlen(const union sudo_defs_val *sd_un)
debug_return_bool(true);
}
static bool
cb_loglinelen(const union sudo_defs_val *sd_un)
{
debug_decl(cb_loglinelen, SUDOERS_DEBUG_PLUGIN);
eventlog_set_file_maxlen(sd_un->ival);
debug_return_bool(true);
}
static bool
cb_log_year(const union sudo_defs_val *sd_un)
{
@@ -1588,6 +1598,7 @@ set_callbacks(void)
sudo_defs_table[I_SYSLOG_GOODPRI].callback = cb_syslog_goodpri;
sudo_defs_table[I_SYSLOG_BADPRI].callback = cb_syslog_badpri;
sudo_defs_table[I_SYSLOG_MAXLEN].callback = cb_syslog_maxlen;
sudo_defs_table[I_LOGLINELEN].callback = cb_loglinelen;
sudo_defs_table[I_LOG_HOST].callback = cb_log_host;
sudo_defs_table[I_LOGFILE].callback = cb_logfile;
sudo_defs_table[I_LOG_YEAR].callback = cb_log_year;