]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/login/logind-user.c
login: fix re-use of users
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 29 Sep 2015 09:36:18 +0000 (11:36 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Mon, 16 Nov 2015 14:34:41 +0000 (15:34 +0100)
commita832ab6f9953d070ee8f5cf2c7869425760b2645
tree32ac31723b32cbf713a8430b3140ce9ea0942f8b
parent090d92bd6f66afd7c6bf18ef07315058ce826f01
login: fix re-use of users

If the last reference to a user is released, we queue stop-jobs for the
user-service and slice. Only once those are finished, we drop the
user-object. However, if a new session is opened before the user object is
fully dropped, we currently incorrectly re-use the object. This has the
effect, that we get stale sessions without a valid "systemd --user"
instance.

Fix this by properly allowing user_start() to be called, even if
user->stopping is true.
src/login/logind-user.c