From: Todd C. Miller Date: Fri, 30 Mar 2012 16:35:02 +0000 (-0400) Subject: Don't read /etc/environment on Linux when using PAM, PAM should set X-Git-Tag: SUDO_1_7_9p1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4fafe5f61cc82d5a51359b8d2a3881ec11906276;p=sudo Don't read /etc/environment on Linux when using PAM, PAM should set the environment variables as needed via pam_env. --HG-- branch : 1.7 --- diff --git a/sudo.c b/sudo.c index 1efbbb6c6..626c599f1 100644 --- a/sudo.c +++ b/sudo.c @@ -526,7 +526,7 @@ main(argc, argv, envp) 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