From b335a7a3534c2b5b2606f0ad94d7364af38362fc Mon Sep 17 00:00:00 2001 From: Donokami Date: Tue, 23 May 2023 04:04:17 +0200 Subject: [PATCH] Remove ENV environment variable from badenv table --- plugins/sudoers/env.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index 73f017a5cf..04d7021049 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -169,7 +169,6 @@ static const char *initial_badenv_table[] = { "TERMINFO_DIRS", /* terminfo, path(s) to terminfo files */ "TERMPATH", /* termcap, path(s) to termcap files */ "TERMCAP", /* XXX - only if it starts with '/' */ - "ENV", /* ksh, file to source before script runs */ "BASH_ENV", /* bash, file to source before script runs */ "PS4", /* bash, prefix for lines in xtrace mode */ "GLOBIGNORE", /* bash, globbing patterns to ignore */ @@ -885,7 +884,7 @@ rebuild_env(void) /* Reset HOME based on target user if configured to. */ if (ISSET(sudo_mode, MODE_RUN)) { if (def_always_set_home || - ISSET(sudo_mode, MODE_RESET_HOME | MODE_LOGIN_SHELL) || + ISSET(sudo_mode, MODE_RESET_HOME | MODE_LOGIN_SHELL) || (ISSET(sudo_mode, MODE_SHELL) && def_set_home)) reset_home = true; }