login: simply XDG_RUNTIME_DIR management
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 28 Sep 2015 10:53:42 +0000 (12:53 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Mon, 16 Nov 2015 14:34:36 +0000 (15:34 +0100)
commitf9e4283df30ad8916878396da449b2e38656b6f7
tree574c35fa42c97669d1ec4a55b5d125ef2bc81079
parent44690833dfadb523c1f9b6a9e6e1dced44f374e1
login: simply XDG_RUNTIME_DIR management

Lets not pretend we support changing XDG_RUNTIME_DIR via logind state
files. There is no reason to ever write the string into /run, as we
allocate it statically based on the UID, anyway. Lets stop that and just
allocate the runtime_path in "struct User" at all times.

We keep writing it into the /run state to make sure pam_systemd of
previous installs can still read it. However, pam_systemd is now fixed to
allocate it statically as well, so we can safely remove that some time in
the future.

Last but not least: If software depends on systemd, they're more than free
to assume /run/user/$uid is their runtime dir. Lets not require sane
applications to query the environment to get their runtime dir. As long as
applications know their login-UID, they should be safe to deduce the
runtime dir.
src/login/logind-user.c
src/login/pam_systemd.c