summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-05-19 19:30:33 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-05-19 19:35:46 -0400
commit3cea176d5abcb0f14eefbdcbe17fed0847524dd4 (patch)
tree5c73e6196be30da54e4189d5b03839392a189e90 /dix
parent4addfcd633484b7f53b5df1b92bfca8bfc1dc48d (diff)
xace: Fix a bad device access hook call.
Add a proper access mode, and reverse the logic of the return value. Zero ("Success") is returned on success from the hook calls. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dix/events.c b/dix/events.c
index 157f9a8a1..b3caec8be 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4088,10 +4088,10 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
{
xKeymapEvent ke;
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
- if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE))
- memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
- else
+ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess))
bzero((char *)&ke.map[0], 31);
+ else
+ memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
ke.type = KeymapNotify;
DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1,