Add struct sudoers_conf to struct sudoers_plugin_context.
There's now no need to pass this directly to init_parser() since we already pass in a pointer to a sudoers_context struct.
This commit is contained in:
@@ -72,10 +72,10 @@ sudo_file_open(struct sudoers_context *ctx, struct sudo_nss *nss)
|
||||
|
||||
handle = malloc(sizeof(*handle));
|
||||
if (handle != NULL) {
|
||||
const struct sudoers_parser_config *conf = policy_sudoers_conf();
|
||||
handle->fp = open_sudoers(conf->sudoers_path, &outfile, false, NULL);
|
||||
handle->fp = open_sudoers(ctx->parser_conf.sudoers_path, &outfile,
|
||||
false, NULL);
|
||||
if (handle->fp != NULL) {
|
||||
init_parser(ctx, NULL, conf);
|
||||
init_parser(ctx, NULL);
|
||||
init_parse_tree(&handle->parse_tree, NULL, NULL, ctx, nss);
|
||||
if (outfile != NULL) {
|
||||
/* Update path to open sudoers file. */
|
||||
|
Reference in New Issue
Block a user