Skip to contentSkip to conversation

dix: Check whether grab allowed by security provider

PATCH New Richard Haines 1 participant 1 message Jul 5, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dix: Check whether grab allowed by security provider

This patch was created using xorg-server-1.12.2 source.

Call XACE to verify if grab access is allowed.

---
 dix/events.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
dix/events.c +5 -1
index 86336fe..0ce2140 100644
@@ -3807,7 +3807,11 @@ CheckPassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event,
             return FALSE;
     }
 
-    return TRUE;
+    /* Finally check whether grab allowed by security provider */
+    if (XaceHook(XACE_DEVICE_ACCESS, rClient(grab), device, DixGrabAccess) == 0)
+        return TRUE;
+    else
+        return FALSE;
 }
 
 /**
Signature · 8 lines
1.7.10.4



--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.