Xi: allow hooks to silently ignore SelectEvents request
When looking up the window to select on and security hook returns BadAccess, the request is just silently ignored, instead of rejected. This way, security hook can prevent untrusted clients to listen on arbitrary windows, without the client even noticing. The client won't get this BadAccess error, but instead thinking everything's fine, just not getting the actual events. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
349d13961d
commit
c3f042de23
|
@ -161,6 +161,11 @@ ProcXISelectEvents(ClientPtr client)
|
|||
return BadValue;
|
||||
|
||||
rc = dixLookupWindow(&win, stuff->win, client, DixReceiveAccess);
|
||||
|
||||
// when access to the window is denied, just pretend everything's okay
|
||||
if (rc == BadAccess)
|
||||
return Success;
|
||||
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue