chiark / gitweb /
logind: save/restore session devices and their respective file descriptors
authorFranck Bui <fbui@suse.com>
Thu, 16 Mar 2017 10:17:09 +0000 (11:17 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:51 +0000 (09:46 +0200)
commit6179ccf82559f78ee6526452d6052b4a964f7f3b
treeb7f96d0b874c4d4fc97f8b43ec21a5d479cb4b85
parent91d60274701a12d2bbcd2b8e40f8b8abe00be0e7
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