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 23:13:57 -0400 |
commit | 5cd5a01259ba349f1868ca4af04207cf120d69e4 (patch) | |
tree | e2390eaaba9c67f94c6f87ba8c6618595b7dcb81 | |
parent | a9f85dcefbadfe44d8c58ad08430aaadb8c59d34 (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>
(cherry picked from commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4)
-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 63b067435..ee6ac9e9d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4220,10 +4220,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; (void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, |