summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-10-23 09:19:41 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-23 17:42:47 +1030
commitff60e592f003d8bc45789a1a14e86be22f5242b2 (patch)
tree41279d3a5ef622d5187028b628c7d3133b4f56a1 /dix
parent98f01c2abe4771d76febf8fe70111b2bddfab776 (diff)
dix: don't allow VCP/VCK be disabled through properties.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 972edcb38..1100a29eb 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -111,6 +111,11 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
if (prop->format != 8 || prop->type != XA_INTEGER || prop->size != 1)
return BadValue;
+ /* Don't allow disabling of VCP/VCK */
+ if ((dev == inputInfo.pointer || dev == inputInfo.keyboard) &&
+ !(*(CARD8*)prop->data))
+ return BadAccess;
+
if (!checkonly)
{
if ((*((CARD8*)prop->data)) && !dev->enabled)