I know this bug is from 2001, but it's still an issue.

I am a big fan of putting software in /opt/foo and have adapted
my PATH variables to reference it, but cannot access it,
even though all of sudo would suggest it does:

i.ga...@panic ~ % sudo sudo -V
[snip]
Environment variables to preserve:
        XAUTHORIZATION
        XAUTHORITY
        TZ
        PS2
        PS1
        PATH
        MAIL
        LS_COLORS
        KRB5CCNAME
        HOSTNAME
        HOME
        DISPLAY
        COLORS
[/snip]
i.ga...@panic ~ % echo 'echo $PATH' | sudo zsh
/usr/local/bin:/usr/bin:/bin:/opt/bw/bin:/opt/bw/sbin
i.ga...@panic ~ %

Of course this is caused by the --secure-path configure option, which
hard-resets the path, before actually searching for the binary to execute.

My suggestion is to follow Fedora's example here and drop the option
all-together, and instead configure a sane/secure path in /etc/sudoers:
https://bugzilla.redhat.com/show_bug.cgi?id=517428


So long,
-- 
Igor Galić

Tel: +43 (0) 699 122 96 338
Fax: +43 (0) 1 90 89 226
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to