Global environment variables are not global in sudo shell
Bug #162837 reported by
Olivier Blanc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Since the upgrade to "sudo 1.6.9p6-1ubuntu1 ", the global environment variables are not passed as global variables to sudo shell
For exemple,
export http_proxy=http://
returns
http://
and returns for printenv
TERM=xterm
LANG=fr_FR.UTF-8
DISPLAY=:0.0
COLORTERM=
XAUTHORITY=
HOME=/home/olivier
SHELL=/bin/bash
LOGNAME=root
USER=root
USERNAME=root
SUDO_COMMAND=
SUDO_USER=olivier
SUDO_UID=507
SUDO_GID=501
No reference to http_proxy variable.
To post a comment you must log in.
Hi,
I can confirm this behaviour with Hardy Alpha 4.
I've an application that uses java and test for a variable named "JAVA_HOME". Setting it in /etc/profile or manually using a export statement, the variable is not preserved using sudo. With Gutsy all is fine.