Sudo already parses /etc/environment when used with the -i option. If our goal is to have it always parse /etc/environment, how about simply doing the following?
Index: sudo-1.8.3p1/plugins/sudoers/sudoers.c =================================================================== --- sudo-1.8.3p1.orig/plugins/sudoers/sudoers.c 2011-10-25 10:08:12.000000000 -0400 +++ sudo-1.8.3p1/plugins/sudoers/sudoers.c 2012-05-15 20:40:38.997780972 -0400 @@ -581,12 +581,12 @@ NewArgv[0] = NewArgv[1]; NewArgv[1] = "--login"; } + } #if defined(__linux__) || defined(_AIX) /* Insert system-wide environment variables. */ read_env_file(_PATH_ENVIRONMENT, TRUE); #endif - } /* Insert system-wide environment variables. */ if (def_env_file) I still need to think about the security ramifications in doing so though. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/982684 Title: sudo, pkexec don't apply global environment settings from /etc/environment To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/982684/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs