diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-09-28 08:02:00 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-09-28 08:02:00 -0400 |
commit | 5c03d131815cfe2f78792277ab8352e69e830196 (patch) | |
tree | d321abc400033fce3978558ce9186d89febcdbef /Xi/listdev.c | |
parent | 27612748e0ec20f3a23839f0a12e39f598dd722c (diff) |
xace: add new hooks + access controls: XInput extension.
Introduces new dix API to lookup a device, dixLookupDevice(), which
replaces LookupDeviceIntRec and LookupDevice.
Diffstat (limited to 'Xi/listdev.c')
-rw-r--r-- | Xi/listdev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Xi/listdev.c b/Xi/listdev.c index 160ad02fb..041de7635 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -63,8 +63,8 @@ SOFTWARE. #include <X11/extensions/XIproto.h> #include "XIstubs.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" /* FIXME */ +#include "xace.h" #include "listdev.h" @@ -310,7 +310,7 @@ ProcXListInputDevices(ClientPtr client) xListInputDevicesReply rep; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ - int size = 0; + int rc, size = 0; int total_length; char *devbuf; char *classbuf; @@ -329,10 +329,16 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); for (d = inputInfo.devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; SizeDeviceInfo(d, &namesize, &size); numdevs++; } for (d = inputInfo.off_devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; SizeDeviceInfo(d, &namesize, &size); numdevs++; } |