diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-02-12 19:59:10 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2008-02-12 19:59:10 -0500 |
commit | 0d492b2166c4026b9078ffd86d89a31ebe590be4 (patch) | |
tree | 5588d9c8aa3152abff9b8d4a920dcf963be124ea /Xext | |
parent | 4be69e41c07b784f75918141eead70415c0ec4a4 (diff) |
XACE: Move the selection access hook to its own function.
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xace.c | 18 | ||||
-rw-r--r-- | Xext/xace.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Xext/xace.c b/Xext/xace.c index b2c7e4ab4..e88debc5f 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -63,6 +63,13 @@ int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, return rec.status; } +int XaceHookSelectionAccess(ClientPtr client, Atom name, Mask access_mode) +{ + XaceSelectionAccessRec rec = { client, name, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec); + return rec.status; +} + void XaceHookAuditEnd(ClientPtr ptr, int result) { XaceAuditRec rec = { ptr, result }; @@ -169,17 +176,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_SELECTION_ACCESS: { - XaceSelectionAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, Atom), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SCREEN_ACCESS: case XACE_SCREENSAVER_ACCESS: { XaceScreenAccessRec rec = { diff --git a/Xext/xace.h b/Xext/xace.h index 6f1f267ad..2016ca322 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -69,6 +69,8 @@ extern int XaceHook( extern int XaceHookDispatch(ClientPtr ptr, int major); extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, PropertyPtr pProp, Mask access_mode); +extern int XaceHookSelectionAccess(ClientPtr ptr, Atom name, + Mask access_mode); extern void XaceHookAuditEnd(ClientPtr ptr, int result); /* Register a callback for a given hook. @@ -106,12 +108,14 @@ extern void XaceCensorImage( #define XaceHook(args...) Success #define XaceHookDispatch(args...) Success #define XaceHookPropertyAccess(args...) Success +#define XaceHookSelectionAccess(args...) Success #define XaceHookAuditEnd(args...) { ; } #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success #define XaceHookDispatch(...) Success #define XaceHookPropertyAccess(...) Success +#define XaceHookSelectionAccess(...) Success #define XaceHookAuditEnd(...) { ; } #define XaceCensorImage(...) { ; } #endif |