diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-28 15:10:20 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-28 15:10:20 -0400 |
commit | 41355a53c29bbf879da0c6ea562294fcc7ef89ff (patch) | |
tree | dcf3fc44e458010a882f52e8c20c24de4bcd555b /dix/grabs.c | |
parent | 4017d3190234e189a0bbd33193a148d4d3c7556b (diff) |
xace: add hooks + new access codes: core protocol input requests
Diffstat (limited to 'dix/grabs.c')
-rw-r--r-- | dix/grabs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dix/grabs.c b/dix/grabs.c index 2210cd05e..b8d0df88d 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -58,6 +58,7 @@ SOFTWARE. #include "inputstr.h" #include "cursorstr.h" #include "dixgrabs.h" +#include "xace.h" #define BITMASK(i) (((Mask)1) << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) @@ -309,6 +310,8 @@ int AddPassiveGrabToList(GrabPtr pGrab) { GrabPtr grab; + Mask access_mode = DixGrabAccess; + int rc; for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { @@ -322,6 +325,13 @@ AddPassiveGrabToList(GrabPtr pGrab) } } + if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, clients[CLIENT_ID(grab->resource)], + grab->device, access_mode); + if (rc != Success) + return rc; + /* Remove all grabs that match the new one exactly */ for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { |