Add log_format sudoers setting to select sudo or json format logs.

Defaults to sudo-format logs.
This commit is contained in:
Todd C. Miller
2020-10-27 15:26:02 -06:00
parent 6bc729aa36
commit 28d6771d24
7 changed files with 132 additions and 19 deletions

View File

@@ -38,6 +38,12 @@ static struct def_values def_data_timestamp_type[] = {
{ NULL, 0 },
};
static struct def_values def_data_log_format[] = {
{ "sudo", sudo },
{ "json", json },
{ NULL, 0 },
};
struct sudo_defs_types sudo_defs_table[] = {
{
"syslog", T_LOGFAC|T_BOOL,
@@ -559,6 +565,10 @@ struct sudo_defs_types sudo_defs_table[] = {
"runchroot", T_STR|T_BOOL|T_CHPATH,
N_("Root directory to change to before executing the command: %s"),
NULL,
}, {
"log_format", T_TUPLE,
N_("The format of logs to produce: %s"),
def_data_log_format,
}, {
NULL, 0, NULL
}