From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: Patching the default PATH of `su`
Date: Fri, 06 Apr 2018 10:01:57 +0200 [thread overview]
Message-ID: <8737084vbe.fsf@gnu.org> (raw)
In-Reply-To: <20180405163712.GA24811@jasmine.lan> (Leo Famulari's message of "Thu, 5 Apr 2018 12:37:12 -0400")
Hello,
Leo Famulari <leo@famulari.name> skribis:
> In the man page of su(1), it says this:
>
> ------
> The current environment is passed to the new shell. The value of $PATH is reset to
> /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the superuser.
> This may be changed with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs.
> ------
>
> This means that `su leo` or `sudo su` give a broken environment on
> GuixSD. You have to use `su --login` instead.
>
> Should we use our own values for ENV_PATH and ENV_SUPATH so that this
> works out of the box?
Probably, yes. It would be good to check how this affects
mingetty/login, sshd, etc.
Note that libc also has its own default PATH value in <paths.h>:
/* Default search path. */
#define _PATH_DEFPATH "/usr/bin:/bin"
/* All standard utilities path. */
#define _PATH_STDPATH \
"/usr/bin:/bin:/usr/sbin:/sbin"
Does ‘su’ rely on this? In a future rebuild cycle we could change these
values, but /run/current-system/bin wouldn’t work on foreign distros, so
it’s not clear there’s much to gain.
Thanks,
Ludo’.
next prev parent reply other threads:[~2018-04-06 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 16:37 Patching the default PATH of `su` Leo Famulari
2018-04-06 8:01 ` Ludovic Courtès [this message]
2018-04-06 12:39 ` Leo Famulari
2018-04-09 16:17 ` [bug#31112] " Leo Famulari
2018-04-09 20:47 ` Ludovic Courtès
2018-04-13 15:52 ` bug#31112: " Leo Famulari
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=8737084vbe.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.