chiark / gitweb /
logind: fail on CreateSession if already in session
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 7 Jul 2015 17:38:41 +0000 (19:38 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:06:00 +0000 (10:06 +0100)
commit6c36148bbc47bead5483bb4e911f6698c1e7c21e
tree0770da346a6b953615e02e192f1456bbf5a6c0e1
parentbad23a8de0f2bc88e8efa180395f2051132c8fe8
logind: fail on CreateSession if already in session

Right now, if you're already in a session and call CreateSession, we
return information about the current session of yours. This is highy
confusing and a nasty hack. Avoid that, and instead return a commonly
known error, so the caller can detect that.

This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT
in pam_systemd, if you're already in a session. But this sounds like the
right thing to do, anyway.
src/libelogind/sd-bus/bus-common-errors.h
src/login/logind-core.c
src/login/logind-dbus.c
src/login/pam_elogind.c