diff options
Diffstat (limited to 'plugins/sudoers/visudo.c')
-rw-r--r-- | plugins/sudoers/visudo.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index 42bae3d6d..53373bd53 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -111,7 +111,7 @@ struct sudo_user sudo_user; struct passwd *list_pw; static const char *path_sudoers = _PATH_SUDOERS; static struct sudoersfile_list sudoerslist = TAILQ_HEAD_INITIALIZER(sudoerslist); -static struct sudoers_parser_config parser_conf = SUDOERS_PARSER_CONFIG_INITIALIZER; +static struct sudoers_parser_config sudoers_conf = SUDOERS_PARSER_CONFIG_INITIALIZER; static bool checkonly; static bool edit_includes = true; static unsigned int errors; @@ -241,11 +241,11 @@ main(int argc, char *argv[]) if (fflag) { /* Looser owner/permission checks for an uninstalled sudoers file. */ if (!use_owner) { - parser_conf.sudoers_uid = (uid_t)-1; - parser_conf.sudoers_gid = (gid_t)-1; + sudoers_conf.sudoers_uid = (uid_t)-1; + sudoers_conf.sudoers_gid = (gid_t)-1; } if (!use_perms) - parser_conf.sudoers_mode |= S_IWUSR; + sudoers_conf.sudoers_mode |= S_IWUSR; } else { /* Check/set owner and mode for installed sudoers file. */ use_owner = true; @@ -289,10 +289,10 @@ 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. */ - parser_conf.strict = true; - parser_conf.verbose = quiet ? 0 : 2; - parser_conf.sudoers_path = path_sudoers; - init_parser(NULL, &parser_conf); + sudoers_conf.strict = true; + sudoers_conf.verbose = quiet ? 0 : 2; + sudoers_conf.sudoers_path = path_sudoers; + init_parser(NULL, &sudoers_conf); if ((sudoersin = open_sudoers(path_sudoers, &sudoers, true, NULL)) == NULL) exit(EXIT_FAILURE); sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale); @@ -655,7 +655,7 @@ reparse_sudoers(char *editor, int editor_argc, char **editor_argv, /* Clean slate for each parse */ if (!init_defaults()) sudo_fatalx("%s", U_("unable to initialize sudoers default values")); - init_parser(sp->opath, &parser_conf); + init_parser(sp->opath, &sudoers_conf); sp->errorline = -1; /* Parse the sudoers temp file(s) */ @@ -1072,7 +1072,7 @@ check_syntax(const char *path, bool quiet, bool strict, bool check_owner, goto done; } } - init_parser(fname, &parser_conf); + init_parser(fname, &sudoers_conf); sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale); if (sudoersparse() && !parse_error) { if (!quiet) @@ -1343,21 +1343,21 @@ parse_sudoers_options(void) p = *cur + sizeof("sudoers_uid=") - 1; id = sudo_strtoid(p, &errstr); if (errstr == NULL) - parser_conf.sudoers_uid = (uid_t)id; + sudoers_conf.sudoers_uid = (uid_t)id; continue; } if (MATCHES(*cur, "sudoers_gid=")) { p = *cur + sizeof("sudoers_gid=") - 1; id = sudo_strtoid(p, &errstr); if (errstr == NULL) - parser_conf.sudoers_gid = (gid_t)id; + sudoers_conf.sudoers_gid = (gid_t)id; continue; } if (MATCHES(*cur, "sudoers_mode=")) { p = *cur + sizeof("sudoers_mode=") - 1; mode = sudo_strtomode(p, &errstr); if (errstr == NULL) - parser_conf.sudoers_mode = mode; + sudoers_conf.sudoers_mode = mode; continue; } } |