]> git.ipfire.org Git - thirdparty/systemd.git/commit
pam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTOR...
authorLennart Poettering <lennart@poettering.net>
Sun, 23 Feb 2025 02:12:16 +0000 (03:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Feb 2025 21:07:05 +0000 (22:07 +0100)
commitcfb7abc7fc8a7a3a79d44d0511e65a40566f1949
treebbc4cff85bacdb6c5e2269a27ec384650f2df021
parente35b78f14f15815011becd98fe9a844a4b5d02f8
pam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTORY mgmt

When a user logs into a non-default area we give them a private
$HOME for that area (that's what 'area' is supposed to be after all). We
so far left $XDG_RUNTIME_DIRECTORY as it was. Let's change that and
mirror the subdirectory logic there too.

Why? $XDG_RUNTIME_DIR is generally the place where AF_UNIX sockets are
bound that can be used to connect to per-user services. (in particular
all those which are behind D-Bus.) If we don't patch $XDG_RUNTIME_DIR
like this then this means all the backing services will use the main
area, which is problematic (since clients and services will disagree on
$HOME), and makes it impossible to support the area concept for
graphical logins properly.

This does not actually make graphical logins work, but it at least makes
them fail cleanly. That's because this patch alone won't make sure a
per-area service manager/dbus instance is invoked automatically. That
however can be added later, in a patch to logind.
src/login/pam_systemd.c