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

Move sudoers search path to struct sudoers_parser_config.

That way we can avoid passing it to init_parser() directly.
We still need sudoers_search_path to be shared between the lexer
and the parser.
This commit is contained in:
Todd C. Miller
2023-05-08 17:04:38 -06:00
parent 9d7c30c5a8
commit 8cbd5462a6
10 changed files with 42 additions and 46 deletions

View File

@@ -180,6 +180,7 @@ sudoers_policy_deserialize_info(void *v, struct defaults_list *defaults)
}
}
}
parser_conf.sudoers_path = path_sudoers;
/* Parse command line settings. */
sudo_user.flags = 0;
@@ -630,13 +631,6 @@ policy_sudoers_conf(void)
return &parser_conf;
}
/* Return the path to the sudoers file, which may be set in the plugin args. */
const char *
policy_path_sudoers(void)
{
return path_sudoers;
}
/* Return the path to ldap.conf file, which may be set in the plugin args. */
const char *
policy_path_ldap_conf(void)