Skip to content

Commit c7a61a9

Browse files
committed
struct sudoers_user_context: rename env_vars to env_add
1 parent 2b87749 commit c7a61a9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

plugins/sudoers/logging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ sudoers_to_eventlog(const struct sudoers_context *ctx, struct eventlog *evlog,
10021002
evlog->submitgroup = grp->gr_name;
10031003
evlog->ttyname = ctx->user.ttypath;
10041004
evlog->argv = (char **)argv;
1005-
evlog->env_add = (char **)ctx->user.env_vars;
1005+
evlog->env_add = (char **)ctx->user.env_add;
10061006
evlog->envp = (char **)envp;
10071007
evlog->submit_time = ctx->submit_time;
10081008
evlog->lines = ctx->user.lines;

plugins/sudoers/sudoers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ sudoers_check_common(struct sudoers_context *ctx, int pwflag)
582582
U_("sorry, you are not allowed to preserve the environment"));
583583
goto bad;
584584
} else {
585-
if (!validate_env_vars(ctx, ctx->user.env_vars))
585+
if (!validate_env_vars(ctx, ctx->user.env_add))
586586
goto bad;
587587
}
588588
}
@@ -641,7 +641,7 @@ sudoers_check_cmnd(int argc, char * const argv[], char *env_add[],
641641

642642
/* Environment variables specified on the command line. */
643643
if (env_add != NULL && env_add[0] != NULL)
644-
sudoers_ctx.user.env_vars = env_add;
644+
sudoers_ctx.user.env_add = env_add;
645645

646646
/*
647647
* Make a local copy of argc/argv, with special handling for the
@@ -754,7 +754,7 @@ sudoers_check_cmnd(int argc, char * const argv[], char *env_add[],
754754
}
755755

756756
/* Insert user-specified environment variables. */
757-
if (!insert_env_vars(sudoers_ctx.user.env_vars)) {
757+
if (!insert_env_vars(sudoers_ctx.user.env_add)) {
758758
sudo_warnx("%s",
759759
U_("error setting user-specified environment variables"));
760760
goto error;

plugins/sudoers/sudoers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct sudoers_user_context {
131131
char *cmnd_list;
132132
char *ccname;
133133
struct gid_list *gid_list;
134-
char * const * env_vars;
134+
char * const * env_add;
135135
int closefrom;
136136
int lines;
137137
int cols;

0 commit comments

Comments
 (0)