summaryrefslogtreecommitdiff
path: root/Xext/xace.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-04-29 14:22:52 -0400
committerAdam Jackson <ajax@redhat.com>2016-06-10 13:26:19 -0400
commit6cb34816afa95d9214199c363f9b4bb5ecbae77b (patch)
treee238564ed4559eb1b504cf0912075f587296a29f /Xext/xace.h
parentda9fec4eddd554b4b709ba58b4436aef5a76cd51 (diff)
xace: Remove the audit hooks and tune dispatch
There are no in-tree consumers of the audit hooks, and they are in any case redundant with the dtrace dispatch hooks. Neither is there any in-tree user of the core request dispatch hook. The extension hook is only used for non-default security cases, but in the absence of LTO we always have to take the function call into XaceHookDispatch to find out that there's no callback registered. Cc: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext/xace.h')
-rw-r--r--Xext/xace.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Xext/xace.h b/Xext/xace.h
index 6a8d0c4bd..8c8723288 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -52,9 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define XACE_SCREENSAVER_ACCESS 12
#define XACE_AUTH_AVAIL 13
#define XACE_KEY_AVAIL 14
-#define XACE_AUDIT_BEGIN 15
-#define XACE_AUDIT_END 16
-#define XACE_NUM_HOOKS 17
+#define XACE_NUM_HOOKS 15
extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
@@ -71,12 +69,16 @@ extern _X_EXPORT int XaceHookIsSet(int hook);
/* Special-cased hook functions
*/
extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major);
+#define XaceHookDispatch(c, m) \
+ ((XaceHooks[XACE_EXT_DISPATCH] && (m) >= EXTENSION_BASE) ? \
+ XaceHookDispatch((c), (m)) : \
+ Success)
+
extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin,
PropertyPtr *ppProp,
Mask access_mode);
extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel,
Mask access_mode);
-extern _X_EXPORT void XaceHookAuditEnd(ClientPtr ptr, int result);
/* Register a callback for a given hook.
*/
@@ -116,7 +118,6 @@ extern _X_EXPORT void XaceCensorImage(ClientPtr client,
#define XaceHookDispatch(args...) Success
#define XaceHookPropertyAccess(args...) Success
#define XaceHookSelectionAccess(args...) Success
-#define XaceHookAuditEnd(args...) { ; }
#define XaceCensorImage(args...) { ; }
#else
#define XaceHook(...) Success
@@ -124,7 +125,6 @@ extern _X_EXPORT void XaceCensorImage(ClientPtr client,
#define XaceHookDispatch(...) Success
#define XaceHookPropertyAccess(...) Success
#define XaceHookSelectionAccess(...) Success
-#define XaceHookAuditEnd(...) { ; }
#define XaceCensorImage(...) { ; }
#endif