summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-13 18:10:45 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-13 18:10:45 +0300
commit335b503c5e7041bb0c44611e496d1c46f554e630 (patch)
treed4b1439827a9303dcad78d0b20edbc1ad011a620 /dix/events.c
parentbd3d93be82d91e4cf35ae317dfd658d1706257ea (diff)
parentcf948b7b04dfeb61a294889027b9a54f6b9b478e (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/dix/events.c b/dix/events.c
index 646a9ba03..ebc43b090 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -140,8 +140,8 @@ extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
#endif
-#ifdef XCSECURITY
-#include "securitysrv.h"
+#ifdef XACE
+#include "xace.h"
#endif
#ifdef XEVIE
@@ -2479,8 +2479,8 @@ CheckPassiveGrabsOnWindow(
(grab->confineTo->realized &&
BorderSizeNotEmpty(grab->confineTo))))
{
-#ifdef XCSECURITY
- if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE))
+#ifdef XACE
+ if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE))
return FALSE;
#endif
#ifdef XKB
@@ -2842,6 +2842,10 @@ drawable.id:0;
DeliverFocusedEvent(keybd, xE, sprite.win, count);
if (deactivateGrab)
(*keybd->DeactivateGrab)(keybd);
+
+#ifdef XACE
+ XaceHook(XACE_KEY_AVAIL, xE, keybd, count);
+#endif
}
#ifdef XKB
@@ -3274,10 +3278,10 @@ EnterLeaveEvent(
{
xKeymapEvent ke;
-#ifdef XCSECURITY
+#ifdef XACE
ClientPtr client = grab ? rClient(grab)
: clients[CLIENT_ID(pWin->drawable.id)];
- if (!SecurityCheckDeviceAccess(client, keybd, FALSE))
+ if (!XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE))
{
bzero((char *)&ke.map[0], 31);
}
@@ -3369,9 +3373,9 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
{
xKeymapEvent ke;
-#ifdef XCSECURITY
+#ifdef XACE
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
- if (!SecurityCheckDeviceAccess(client, dev, FALSE))
+ if (!XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE))
{
bzero((char *)&ke.map[0], 31);
}
@@ -3640,8 +3644,8 @@ ProcSetInputFocus(client)
REQUEST(xSetInputFocusReq);
REQUEST_SIZE_MATCH(xSetInputFocusReq);
-#ifdef XCSECURITY
- if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
+#ifdef XACE
+ if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
return Success;
#endif
return SetInputFocus(client, inputInfo.keyboard, stuff->focus,
@@ -3905,8 +3909,8 @@ ProcGrabKeyboard(ClientPtr client)
int result;
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
-#ifdef XCSECURITY
- if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE))
+#ifdef XACE
+ if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE))
{
result = Success;
rep.status = AlreadyGrabbed;