chiark / gitweb /
login: fix re-use of users
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 29 Sep 2015 09:36:18 +0000 (11:36 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:58:55 +0000 (12:58 +0200)
commit2c0a91fedc150195f54d91bf75515e4bfff0d753
tree18c8451147a981b8ab239dbff40798145b6fbe60
parent5814139990daf10155b4fb0951ee456ac9c97a4b
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 "elogind --user"
instance.

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