summaryrefslogtreecommitdiff
path: root/units/user-runtime-dir@.service.in
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2022-07-07 12:02:04 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2022-07-12 22:54:39 +0100
commit278e815bfa3e4c2e3914e00121c37fc844cb2025 (patch)
treecbeb7409cce18b625119ff7fdd6dbf0b117e9127 /units/user-runtime-dir@.service.in
parentaa5ae9711ef3cd0c69b7fcfbd65bca05fb704a8a (diff)
downloadsystemd-278e815bfa3e4c2e3914e00121c37fc844cb2025.tar.gz
logind: don't delay login for root even if systemd-user-sessions.service is not activated yet
If for any reason something goes wrong during the boot process (most likely due to a network issue), system admins should be allowed to log in to the system to debug the problem. However due to the login session barrier enforced by systemd-user-sessions.service for all users, logins for root will be delayed until a (dbus) timeout expires. Beside being confusing, it's not a nice user experience to wait for an indefinite period of time (no message is shown) this and also suggests that something went wrong in the background. The reason of this delay is due to the fact that all units involved in the creation of a user session are ordered after systemd-user-sessions.service, which is subject to network issues. If root needs to log in at that time, logind is requested to create a new session (via pam_systemd), which ultimately ends up waiting for systemd-user-session.service to be activated. This has the bad side effect to block login for root until the dbus call done by pam_systemd times out and the PAM stack proceeds anyways. To solve this problem, this patch orders the session scope units and the user instances only after systemd-user-sessions.service for unprivileged users only.
Diffstat (limited to 'units/user-runtime-dir@.service.in')
-rw-r--r--units/user-runtime-dir@.service.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/units/user-runtime-dir@.service.in b/units/user-runtime-dir@.service.in
index 61becff2c6..7314173324 100644
--- a/units/user-runtime-dir@.service.in
+++ b/units/user-runtime-dir@.service.in
@@ -10,7 +10,7 @@
[Unit]
Description=User Runtime Directory /run/user/%i
Documentation=man:user@.service(5)
-After=systemd-user-sessions.service dbus.service
+After=dbus.service
StopWhenUnneeded=yes
IgnoreOnIsolate=yes