$ export FOO=bar
$ echo $FOO
bar
$ sudo bash -c 'echo $FOO'
$
That's right, sudo no longer passes through environment variables by default. I don't know about you, but this seems quite likely to bite lots of code I write. I often do environment setup (PERL5LIB, PATH, directory roots, etc) and then run a sub-process as another user via sudo. I'm expecting a flood of reports of problems from DBD::Oracle users as they find that ORA_HOME mysteriously stopped working when the upgrade to FC5.
The fix is easy, just undo the change discussed here:
I like Josh Bresser's comment about this change:
as long as there is a release note about it, it will only surprise the people who don't read the release notes
I guess that's true. Only problem is, it wasn't put in the release notes!
-sam
PS: Shout out to Michael Peters for tracking this one down.
PERL5LIB (Score:2)
Re:PERL5LIB (Score:2)
As far as doing this for "security reasons", meh. Giving a user sudo access is just asking for a security elevation attack. Making it a little harder by restricting environment vars isn't buying all that much.
-sam
Re:PERL5LIB (Score:2)
Re:PERL5LIB (Score:2)
-sam
Debian Security Upgrade (Score:2)
-Dom
Now I understand (Score:1)
sudo perl -MCPAN -e shellwould end up with root owned files in my normal user home directory. And it also accounts for gpg problems with Module::Signature (~/.gpg/ owned by someone else). Basically after sudo everything still thinks $HOME is the normal user's directory not ~root/.Re:Now I understand (Score:2)