[pacman-dev] makepkg patch to preserve environment variables (when "-s"ing)
it just changes every "sudo" to "sudo -E" (useful when using $http_proxy) version 3.1.4 http://rob.kingofnerds.net/makepkg_sudo.patch
On Tue, Jul 29, 2008 at 8:28 AM, <rob@kingofnerds.net> wrote:
it just changes every "sudo" to "sudo -E" (useful when using $http_proxy)
version 3.1.4
I also need $http_proxy on one box, but I don't need that. I just configured sudo accordingly. Here are the relevant bits from /etc/sudoers : %wheel ALL=(ALL) SETENV: ALL The only important part is SETENV: here, which you need to add to the line corresponding to your user. (in my case, the user belongs to wheel group :P). And then this : Defaults env_keep += "http_proxy" There might be other (better?) ways to deal with this, so if anyone knows alternative, I am interested to. If you only want to keep the environment when using pacman, it might be possible to do just that in the sudo config file as well. I never did it but I assume it is possible since I see you can specify commands in the config. Anyway, I think it would be a better way to deal with this rather than having to add this -E argument.
On Tue, Jul 29, 2008 at 2:41 AM, Xavier <shiningxc@gmail.com> wrote:
On Tue, Jul 29, 2008 at 8:28 AM, <rob@kingofnerds.net> wrote:
it just changes every "sudo" to "sudo -E" (useful when using $http_proxy)
version 3.1.4
I also need $http_proxy on one box, but I don't need that. I just configured sudo accordingly. Here are the relevant bits from /etc/sudoers : %wheel ALL=(ALL) SETENV: ALL
The only important part is SETENV: here, which you need to add to the line corresponding to your user. (in my case, the user belongs to wheel group :P).
And then this : Defaults env_keep += "http_proxy"
There might be other (better?) ways to deal with this, so if anyone knows alternative, I am interested to.
If you only want to keep the environment when using pacman, it might be possible to do just that in the sudo config file as well. I never did it but I assume it is possible since I see you can specify commands in the config. Anyway, I think it would be a better way to deal with this rather than having to add this -E argument.
I'd side with Xavier here. -E has the potential to bring in things we may not want, whereas a properly configured sudoers file only lets through the envvars explicitly set.
On Tue, Jul 29, 2008 at 10:37 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Tue, Jul 29, 2008 at 2:41 AM, Xavier <shiningxc@gmail.com> wrote:
On Tue, Jul 29, 2008 at 8:28 AM, <rob@kingofnerds.net> wrote:
it just changes every "sudo" to "sudo -E" (useful when using $http_proxy)
version 3.1.4
I also need $http_proxy on one box, but I don't need that. I just configured sudo accordingly. Here are the relevant bits from /etc/sudoers : %wheel ALL=(ALL) SETENV: ALL
The only important part is SETENV: here, which you need to add to the line corresponding to your user. (in my case, the user belongs to wheel group :P).
And then this : Defaults env_keep += "http_proxy"
There might be other (better?) ways to deal with this, so if anyone knows alternative, I am interested to.
If you only want to keep the environment when using pacman, it might be possible to do just that in the sudo config file as well. I never did it but I assume it is possible since I see you can specify commands in the config. Anyway, I think it would be a better way to deal with this rather than having to add this -E argument.
I'd side with Xavier here. -E has the potential to bring in things we may not want, whereas a properly configured sudoers file only lets through the envvars explicitly set.
I agree as well. -Dan
participants (4)
-
Aaron Griffin
-
Dan McGee
-
rob@kingofnerds.net
-
Xavier