From: Bernhard Voelker <mail@bernhard-voelker.de>
To: Bruce Dubbs <bruce.dubbs@gmail.com>, Karel Zak <kzak@redhat.com>,
util-linux@vger.kernel.org
Subject: Re: su(1) --whitelist-environment
Date: Mon, 13 Aug 2018 22:57:01 +0200 [thread overview]
Message-ID: <745f75b6-d849-a519-7855-9de62d999e06@bernhard-voelker.de> (raw)
In-Reply-To: <a745a526-dbc9-ce04-ec4b-8e46d07b8774@gmail.com>
On 08/10/2018 11:06 PM, Bruce Dubbs wrote:
> I think it is unnecessary. su itself does not need the environment
> variable. If a user needs a specific setting, then set it in a script:
>
> su --command myscript
I'm 50:50. The point was to pass in variables values per environment
to a process inside 'su' (or 'sudo'), and one can achieve that with e.g.
$ su -c 'env VAR="val" myscript' user
Well, this might become slightly trickier with real shell or environment
variables wrt/ correct shell quoting:
$ VAR='some value'
$ su -c 'env VAR="'"$VAR"'" myscript' user
It might be worth adding such an example to the documentation.
Have a nice day,
Berny
next prev parent reply other threads:[~2018-08-13 23:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 9:24 su(1) --whitelist-environment Karel Zak
2018-08-10 21:06 ` Bruce Dubbs
2018-08-13 20:57 ` Bernhard Voelker [this message]
2018-08-14 9:32 ` Karel Zak
2018-08-14 10:47 ` Martin Steigerwald
2018-08-14 12:50 ` Bernhard Voelker
2018-08-15 11:04 ` Karel Zak
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=745f75b6-d849-a519-7855-9de62d999e06@bernhard-voelker.de \
--to=mail@bernhard-voelker.de \
--cc=bruce.dubbs@gmail.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/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).