Go back to parsing Defaults entries in update_defaults instead of

as sudoers is read.  Otherwise, we cannot properly support early
defaults like sudoers_locale.
This commit is contained in:
Todd C. Miller
2016-11-09 16:00:12 -07:00
parent efe957544f
commit 79ca752802
12 changed files with 262 additions and 258 deletions

View File

@@ -87,7 +87,7 @@ sudo_file_close(struct sudo_nss *nss)
debug_decl(sudo_file_close, SUDOERS_DEBUG_NSS)
/* Free parser data structures and close sudoers file. */
init_parser(NULL, false, false);
init_parser(NULL, false);
if (nss->handle != NULL) {
fclose(nss->handle);
nss->handle = NULL;
@@ -107,7 +107,7 @@ sudo_file_parse(struct sudo_nss *nss)
if (nss->handle == NULL)
debug_return_int(-1);
init_parser(sudoers_file, false, false);
init_parser(sudoers_file, false);
sudoersin = nss->handle;
if (sudoersparse() != 0 || parse_error) {
if (errorlineno != -1) {