Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 128997

Summary: sudo does not carry env variables
Product: Gentoo Linux Reporter: Taj Morton <tajmorton>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: High    
Version: 2006.0   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Taj Morton 2006-04-05 23:35:40 UTC
By default, sudo has the flag env_reset set. This flag makes sudo drop all variables and set only the core ones (HOME, LOGNAME, PATH, SHELL, TERM, and USER). It causes problems in a few apps that rely on variables being carried over (such as Autopackage).

Why is env_reset on by default? Could it be turned off to make programs that rely on this sudo behaviour not fail with mysterious messages?

Thanks,
Taj
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-06 03:40:10 UTC
sudo does env_reset for security reasons.

This can be disabled for people in %wheel by uncommenting the
# Defaults:%wheel   !env_reset

in /etc/sudoers.