From: Todd C. Miller Date: Thu, 8 Mar 2012 19:51:03 +0000 (-0500) Subject: Don't read /etc/environment on Linux when using PAM, PAM should set X-Git-Tag: SUDO_1_8_5~1^2~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08c6c776c94a5f25511ff8993c9d0f2d37aa7af3;p=sudo Don't read /etc/environment on Linux when using PAM, PAM should set the environment variables as needed via pam_env. --- diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index fbbcc3361..33f2dcfe2 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -594,7 +594,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], NewArgv[1] = "--login"; } -#if defined(__linux__) || defined(_AIX) +#if defined(_AIX) || (defined(__linux__) && !defined(HAVE_PAM)) /* Insert system-wide environment variables. */ read_env_file(_PATH_ENVIRONMENT, true); #endif