diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h index 62a1e8683..3f1596556 100644 --- a/plugins/sudoers/sudoers.h +++ b/plugins/sudoers/sudoers.h @@ -81,10 +81,10 @@ struct group_list { */ struct sudoers_parser_config { const char *sudoers_path; - bool strict; + int strict; + int verbose; bool recovery; bool ignore_perms; - int verbose; mode_t sudoers_mode; uid_t sudoers_uid; gid_t sudoers_gid; @@ -92,9 +92,9 @@ struct sudoers_parser_config { #define SUDOERS_PARSER_CONFIG_INITIALIZER { \ NULL, /* sudoers_path */ \ false, /* strict */ \ + 1, /* verbose level 1 */ \ true, /* recovery */ \ false, /* ignore_perms */ \ - 1, /* verbose level 1 */ \ SUDOERS_MODE, \ SUDOERS_UID, \ SUDOERS_GID \ diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index d64f9015c..c05373bf9 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -285,7 +285,7 @@ main(int argc, char *argv[]) * Parse the existing sudoers file(s) to highlight any existing * errors and to pull in editor and env_editor conf values. */ - ctx.parser_conf.strict = true; + ctx.parser_conf.strict = strict + 1; ctx.parser_conf.verbose = quiet ? 0 : 2; ctx.parser_conf.sudoers_path = path_sudoers; init_parser(&ctx, NULL);