Skip to content

Commit 40217ea

Browse files
committed
Additional variables for initial_badenv_table[]
Adds NODE_OPTIONS, NODE_PATH, _JAVA_OPTIONS, CLASSPATH, GIT_SSH_COMMAND, GIT_CONFIG_GLOBAL, and PYTHONSTARTUP to the list of variables to remove from the environment when "env_reset" is disabled, or sudo's "-E" option is used (if allowed by sudoers). From Michele Piccinni.
1 parent 5e19b6c commit 40217ea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

plugins/sudoers/env.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ static const char *initial_badenv_table[] = {
171171
"BASHOPTS", /* bash, initial "shopt -s" options */
172172
"SHELLOPTS", /* bash, initial "set -o" options */
173173
"JAVA_TOOL_OPTIONS", /* java, extra command line options */
174+
"_JAVA_OPTIONS", /* java, extra command line options (legacy) */
175+
"CLASSPATH", /* java, class search path */
174176
"PERLIO_DEBUG", /* perl, debugging output file */
175177
"PERLLIB", /* perl, search path for modules/includes */
176178
"PERL5LIB", /* perl 5, search path for modules/includes */
@@ -185,8 +187,13 @@ static const char *initial_badenv_table[] = {
185187
"PYTHONPATH", /* python, search path */
186188
"PYTHONINSPECT", /* python, allow inspection */
187189
"PYTHONUSERBASE", /* python, per user site-packages directory */
190+
"PYTHONSTARTUP", /* python, interactive mode startup script */
188191
"RUBYLIB", /* ruby, library load path */
189192
"RUBYOPT", /* ruby, extra command line options */
193+
"NODE_OPTIONS", /* node.js, extra command line options */
194+
"NODE_PATH", /* node.js, module search path */
195+
"GIT_SSH_COMMAND", /* git, custom SSH command */
196+
"GIT_CONFIG_GLOBAL", /* git, global config file override */
190197
"*=()*", /* bash functions */
191198
NULL
192199
};

0 commit comments

Comments
 (0)