diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-02-05 20:07:08 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2008-02-05 20:07:08 -0500 |
commit | bb1a577a6822f781f1e38d2434a13914e74f89aa (patch) | |
tree | eb30cdd9b4275ef08c638eab94cca9e18983243f /Xext/xace.c | |
parent | 019ad5acd20e34dc2aa3b89cc426138db5164c48 (diff) |
XACE: Move the property access hook to its own function.
Diffstat (limited to 'Xext/xace.c')
-rw-r--r-- | Xext/xace.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Xext/xace.c b/Xext/xace.c index 0470e44dd..9ffac450d 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -51,6 +51,14 @@ int XaceHookDispatch(ClientPtr client, int major) } } +int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, + PropertyPtr pProp, Mask access_mode) +{ + XacePropertyAccessRec rec = { client, pWin, pProp, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec); + return rec.status; +} + void XaceHookAuditEnd(ClientPtr ptr, int result) { XaceAuditRec rec = { ptr, result }; @@ -100,18 +108,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_PROPERTY_ACCESS: { - XacePropertyAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, WindowPtr), - va_arg(ap, PropertyPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SEND_ACCESS: { XaceSendAccessRec rec = { va_arg(ap, ClientPtr), |