From: Karel Zak <kzak@redhat.com>
To: "Pádraig Brady" <P@draigBrady.com>,
"Werner Fink" <werner@suse.de>,
"Ludwig Nussel" <ludwig.nussel@suse.de>
Cc: "Thomas Bächler" <thomas@archlinux.org>,
util-linux@vger.kernel.org, "Dave Reisner" <d@falconindy.com>,
"Tobias Powalowski" <tpowa@archlinux.org>
Subject: Re: [su] New su utility messes with my PATH
Date: Thu, 20 Sep 2012 11:47:04 +0200 [thread overview]
Message-ID: <20120920094330.GC16499@x2.net.home> (raw)
In-Reply-To: <50549411.9000302@draigBrady.com>
On Sat, Sep 15, 2012 at 03:43:29PM +0100, Pádraig Brady wrote:
> On 09/15/2012 02:17 PM, Thomas Bächler wrote:
> >I found what I think is absolutely unexpected behaviour in the new su
> >utility. It seems to have been introduced by commit a6fdd3f8.
> >
> >It is about /sbin and /usr/sbin being in the path: Whenever you switch
> >to a non-root user, they are removed from the path, and when you switch
> >to root, they are added. I find it completely unexpected that su (when
> >not running with -l) messes with my environment at all.
> >
> >Commands like
> > PATH=... su -c "cmd" user
> >do not work as expected.
> >
> >In my opinion, when you wish your path (or anything in the environment)
> >to change you should a) use -l to start a login shell or b) configure
> >your scripts to take care of it.
> >
> >I propose to revert the mentioned patch. Opinions?
>
> Ouch, I agree.
> su shouldn't be messing with PATH at all IMHO.
It's Suse patch, I guess there is/was any reason for the patch
commit a6fdd3f8125be23930d955c2bc6b7a46cdaf8a12
Author: Werner Fink <werner@suse.de>
Date: Tue Aug 17 09:09:55 2010 +0200
make sure /sbin resp /usr/sbin are in PATH
Werner, Ludwig? What about to revert the patch?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-09-20 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-15 13:17 [su] New su utility messes with my PATH Thomas Bächler
2012-09-15 14:43 ` Pádraig Brady
2012-09-20 9:47 ` Karel Zak [this message]
2012-09-21 7:54 ` Ludwig Nussel
2012-10-02 8:17 ` Karel Zak
2012-10-02 8:23 ` Thomas Bächler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120920094330.GC16499@x2.net.home \
--to=kzak@redhat.com \
--cc=P@draigBrady.com \
--cc=d@falconindy.com \
--cc=ludwig.nussel@suse.de \
--cc=thomas@archlinux.org \
--cc=tpowa@archlinux.org \
--cc=util-linux@vger.kernel.org \
--cc=werner@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).