Bug 489744 - Regression in sudo since --secure-path was enabled
Regression in sudo since --secure-path was enabled
Product: Fedora
Classification: Fedora
Component: sudo (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Kopeček
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-11 12:28 EDT by Jeff Schroeder
Modified: 2009-06-15 21:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: 1.7.1-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-15 21:57:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Schroeder 2009-03-11 12:28:08 EDT
Description of problem:
Our users have a pretty scary PATH variable and they have a script named runasrelease that does:
sudo -u release bash -c "$*"

Since upgrading to fedora10+, the PATH variable is cleared and set to whatever was builtin with --secure-path. This breaks our expected usage of sudo as it removes PATH which we want set.


or env_reset
env_keep = "HOME PATH"

does not work.

Version-Release number of selected component (if applicable):

How reproducible:
sudo -u anyotheruser bash -c 'echo $PATH'

Steps to Reproduce:
jschroeder@ops2.fra03: ~ $ echo $PATH
jschroeder@ops2.fra03: ~ $ sudo -u release bash -c 'echo $PATH'
[sudo] password for jschroeder: 

Actual results:
PATH is cleared due to the --secure-path option

Expected results:
There should be a way for PATH to not be cleared. !env_reset or adding PATH to env_keep should work. This is fixed in 1.7.0 according to upstream.

Additional info:

* Wed May 14 2008 Peter Vrabec <pvrabec@redhat.com> 1.6.9p13-6
- compiled with secure path (#80215)

https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/192651 ubuntu bug
http://www.gratisoft.us/bugzilla/show_bug.cgi?id=284 upstream bug
Comment 1 Fedora Update System 2009-05-12 08:07:41 EDT
sudo-1.7.1-1.fc11 has been submitted as an update for Fedora 11.
Comment 2 Fedora Update System 2009-05-12 20:23:37 EDT
sudo-1.7.1-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update sudo'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-4879
Comment 3 Bug Zapper 2009-06-09 08:08:45 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 4 Fedora Update System 2009-06-15 21:57:40 EDT
sudo-1.7.1-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.