summaryrefslogtreecommitdiff
path: root/Xext/xace.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-10-17 13:51:11 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-10-17 13:51:11 -0400
commitdb66e66dbf26b91c655f1659859c022cc31f0db6 (patch)
tree011459d82a9ecffa1597e7faf44c05f79dcbd267 /Xext/xace.c
parente3a8cbe523bae8b771ad3c8ad497f4444f6d05d5 (diff)
xace: Add an access_mode field to the extension structure.
This allows the same callback to be used for both extension hooks.
Diffstat (limited to 'Xext/xace.c')
-rw-r--r--Xext/xace.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/Xext/xace.c b/Xext/xace.c
index 3de259f71..b12666159 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -67,6 +67,17 @@ int XaceHook(int hook, ...)
prv = &rec.status;
break;
}
+ case XACE_EXT_DISPATCH: {
+ XaceExtAccessRec rec = {
+ va_arg(ap, ClientPtr),
+ va_arg(ap, ExtensionEntry*),
+ DixUseAccess,
+ Success /* default allow */
+ };
+ calldata = &rec;
+ prv = &rec.status;
+ break;
+ }
case XACE_RESOURCE_ACCESS: {
XaceResourceAccessRec rec = {
va_arg(ap, ClientPtr),
@@ -141,11 +152,11 @@ int XaceHook(int hook, ...)
prv = &rec.status;
break;
}
- case XACE_EXT_DISPATCH:
case XACE_EXT_ACCESS: {
XaceExtAccessRec rec = {
va_arg(ap, ClientPtr),
va_arg(ap, ExtensionEntry*),
+ DixGetAttrAccess,
Success /* default allow */
};
calldata = &rec;
@@ -228,7 +239,7 @@ int XaceHook(int hook, ...)
/* call callbacks and return result, if any. */
CallCallbacks(&XaceHooks[hook], calldata);
- return prv ? *prv : 0;
+ return prv ? *prv : Success;
}
static int