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/xace.c | |
parent | 4be69e41c07b784f75918141eead70415c0ec4a4 (diff) |
XACE: Move the selection access hook to its own function.
Diffstat (limited to 'Xext/xace.c')
-rw-r--r-- | Xext/xace.c | 18 |
1 files changed, 7 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 = { |