From: David Herrmann Date: Tue, 1 Oct 2013 15:53:43 +0000 (+0200) Subject: logind: check whether first drmSetMaster succeeded X-Git-Tag: v208~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=c2e5d024a380bae6ead301fb4f40787b372ec3e0;hp=c2e5d024a380bae6ead301fb4f40787b372ec3e0 logind: check whether first drmSetMaster succeeded 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. ---