]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: save/restore session devices and their respective file descriptors 5600/head
authorFranck Bui <fbui@suse.com>
Thu, 16 Mar 2017 10:17:09 +0000 (11:17 +0100)
committerFranck Bui <fbui@suse.com>
Thu, 8 Jun 2017 14:21:36 +0000 (16:21 +0200)
commitaed24c4cd7641da6f530853d10637568c13c8f35
treec9cfebab6f5d144f14e5d00ab967dd0b2dcb574f
parentdc6284e9efb0a6801dd7a951d39ebb7d9a279676
logind: save/restore session devices and their respective file descriptors

This patch ensures that session devices are saved for each session.

In order to make the revokation logic work when logind is restarted, the
session devices are now saved in the session state files and their respective
file descriptors sent to PID1's fdstore in order to keep them open accross
restart.

This is mandatory in order to keep the revokation logic working. Indeed in case
of input-devices, the same file descriptors must be shared by logind and a
given session controller in order EVIOCREVOKE to work otherwise multiple
sessions can have device access in parallel.

This should be the only remaining and missing piece for making logind fully
restartable.

Fixes: #1163
src/login/logind-session-dbus.c
src/login/logind-session-device.c
src/login/logind-session-device.h
src/login/logind-session.c
src/login/logind-session.h
src/login/logind.c
units/systemd-logind.service.in