diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-05-19 19:30:33 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-05-19 19:35:46 -0400 |
commit | 3cea176d5abcb0f14eefbdcbe17fed0847524dd4 (patch) | |
tree | 5c73e6196be30da54e4189d5b03839392a189e90 /dix | |
parent | 4addfcd633484b7f53b5df1b92bfca8bfc1dc48d (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.c | 6 |
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, |