Bug 475990 - sudo -V not consistent with sudo actual behavior
sudo -V not consistent with sudo actual behavior
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: 2008-12-11 08:39 EST by Tom Horsley
Modified: 2009-06-15 22:43 EDT (History)
4 users (show)

See Also:
Fixed In Version: 1.7.1-2.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-15 22:43:21 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 Tom Horsley 2008-12-11 08:39:34 EST
Description of problem:

In previous fedora versions, sudo retained my $PATH. On fedora 10,
running sudo sudo -V claims that it retains my $PATH, yet running
sudo sh -c 'echo $PATH' clearly shows that it does not retain my $PATH.
One or the other of these behaviours has got to be a bug :-).

I'd prefer that it really did retain my $PATH since I have sudo commands
scattered around all over the place which will now not work if they
are trying to run something in (for example) /usr/local/bin.

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

How reproducible:
every time

Steps to Reproduce:
1. Put a sample script in /usr/local/bin that echoes $PATH
2. sudo sample - doesn't work
3. sudo /usr/local/bin/sample - does work but shows reduced $PATH
Actual results:
tomh> echo $PATH
tomh> sudo sample
sudo: sample: command not found
tomh> sudo /usr/local/bin/sample

Expected results:
tomh> echo $PATH
tomh> sudo sample

Additional info:
This worked in fedora 8 for sure, though I am not positive it retained
my entire path, but I am sure I was able to find things in /usr/local/bin
Comment 1 Karl Hastings 2008-12-11 16:38:46 EST
The -V might be a documentation bug.  But I've already reported the regression wrt secure-path here:  https://bugzilla.redhat.com/show_bug.cgi?id=471603
Comment 2 Tom Horsley 2008-12-11 17:07:03 EST
Yea, I decided I couldn't decide which one was the bug, but clearly
the -V options claims that PATH is preserved, and it ain't, so I put
in this bug to let the maintainers decide which one to fix :-).

Meanwhile, I downloaded the source and rebuilt it with /usr/local/bin
added to the end of the secure path. I think that fixes most of my
problems, and still helps prevent excess path pollution. Maybe
/usr/local/bin/should be added to the official release?
Comment 3 Fedora Update System 2009-05-12 08:50:43 EDT
sudo-1.7.1-2.fc10 has been submitted as an update for Fedora 10.
Comment 4 Fedora Update System 2009-05-12 20:22:03 EDT
sudo-1.7.1-2.fc10 has been pushed to the Fedora 10 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/F10/FEDORA-2009-4874
Comment 5 Fedora Update System 2009-06-15 22:43:09 EDT
sudo-1.7.1-2.fc10 has been pushed to the Fedora 10 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.