]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: put bin before sbin for user instances
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 7 Aug 2015 01:34:15 +0000 (21:34 -0400)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Aug 2019 16:24:44 +0000 (18:24 +0200)
commitdb11487d1062655f17db54c4d710653f16c87313
tree308dfead1c2d3ae50a8ddb9fb688a8e6cb2b36fc
parent581fef8d56a13390a331d4d404f178d7cc188ccf
manager: put bin before sbin for user instances

Traditionally, user logins had a $PATH in which /bin was before /sbin, while
root logins had a $PATH with /sbin first. This allows the tricks that
consolehelper is doing to work. But even if we ignore consolehelper, having the
path in this order might have been used by admins for other purposes, and
keeping the order in user sessions will make it easier the adoption of systemd
user sessions a bit easier.

Fixes #733.
https://bugzilla.redhat.com/show_bug.cgi?id=1744059

OOM handling in manager_default_environment wasn't really correct.
Now the (theorertical) malloc failure in strv_new() is handled.

Please note that this has no effect on:
- systems with merged /bin-/sbin (e.g. arch)

- when there are no binaries that differ between the two locations.

  E.g. on my F30 laptop there is exactly one program that is affected:
  /usr/bin/setup -> consolehelper.

  There is less and less stuff that relies on consolehelper, but there's still
  some.

So for "clean" systems this makes no difference, but helps with legacy setups.

$ dnf repoquery --releasever=31 --qf %{name} --whatrequires usermode
anaconda-live
audit-viewer
beesu
chkrootkit
driftnet
drobo-utils-gui
hddtemp
mate-system-log
mock
pure-ftpd
setuptool
subscription-manager
system-config-httpd
system-config-rootpassword
system-switch-java
system-switch-mail
usermode-gtk
vpnc-consoleuser
wifi-radar
xawtv
man/systemd.exec.xml
src/basic/path-util.h
src/core/manager.c