]> git.ipfire.org Git - thirdparty/systemd.git/commit - meson_options.txt
fix the value of default shells to use /bin and not /usr/bin
authorEli Schwartz <eschwartz93@gmail.com>
Wed, 21 Feb 2024 02:59:13 +0000 (21:59 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 29 Feb 2024 20:51:03 +0000 (21:51 +0100)
commit5656c593cee0a811b896b2887af7efacb99f6adf
treee1b25f9649aad81e2e4ef0f910e528498e134630
parentd52320337ee377f011782ed51e8d39a33e4f23be
fix the value of default shells to use /bin and not /usr/bin

Partially reverts commit b0d3095fd6cc1791a38f57a1982116b4475244ba.

While it is generally worthwhile for systemd to drop split-usr support,
these options are NOT about split-usr support. The universal location of
POSIX sh is always /bin/sh. Bash is pretty reasonably standardized there
too.

This happens irrespective of /bin being a symlink to /usr/bin.
Ramifications of this change include things like:

- portably running shell scripts that might run very nearly anywhere
- /etc/shells support

For standardization and compatibility reasons, these commands with these
paths need to be consistently found on any system, and thus distros make
sure this works, although even on split-usr systems /usr/bin/bash may be
a symlink to /bin/bash.

Embedding the *access path* of bash as /usr/bin/bash in systemd, for
example in libnss_systemd.so, means that login shells must agree with
systemd on how they invoke the shell. End result: users fail to login
because of access violations.

This cannot be fixed by "fixing PAM" because PAM does not follow
symlinks by design: one example is that it needs to treat rbash as
different from bash.

Fixes: https://bugs.gentoo.org/919749
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
meson_options.txt