chiark / gitweb /
logind: check whether first drmSetMaster succeeded
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 1 Oct 2013 15:53:43 +0000 (17:53 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 1 Oct 2013 15:53:43 +0000 (17:53 +0200)
The initial drmSetMaster may fail if there is an active master already. We
must not assume that all existing clients comply to logind rules. We check
for this during session-activation already but didn't during device setup.
Fix this by checking the return code.

As drmSetMaster has had horrible return codes in the past (0 for failure?
EINVAL for denied access, ..) we need to be quite pedantic. To guarantee
an open file-descriptor we need to close the device and reopen it without
master if setting master failed first.


No differences found