xace: Add a "manage" access check when setting the Redirect event bits.
This commit is contained in:
parent
7d14ca59c5
commit
8c6923018c
10
dix/events.c
10
dix/events.c
|
@ -3330,6 +3330,8 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
|||
|
||||
#define AtMostOneClient \
|
||||
(SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask)
|
||||
#define ManagerMask \
|
||||
(SubstructureRedirectMask | ResizeRedirectMask)
|
||||
|
||||
/**
|
||||
* Recalculate which events may be deliverable for the given window.
|
||||
|
@ -3418,12 +3420,20 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
|
|||
{
|
||||
Mask check;
|
||||
OtherClients * others;
|
||||
int rc;
|
||||
|
||||
if (mask & ~AllEventMasks)
|
||||
{
|
||||
client->errorValue = mask;
|
||||
return BadValue;
|
||||
}
|
||||
check = (mask & ManagerMask);
|
||||
if (check) {
|
||||
rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id,
|
||||
RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
}
|
||||
check = (mask & AtMostOneClient);
|
||||
if (check & (pWin->eventMask|wOtherEventMasks(pWin)))
|
||||
{ /* It is illegal for two different
|
||||
|
|
Loading…
Reference in New Issue
Block a user