diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2006-12-01 20:48:15 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> | 2006-12-01 21:15:41 -0500 |
commit | f44f14fe564d834568a0afefba944223a73ea0f5 (patch) | |
tree | bfa5eced6d2aa797c34c86aab8926be289f263c1 /Xext | |
parent | a5d6499d666fea4a9988118ddd3a5e4c9cfcc32c (diff) |
Define calls away when not building XACE, allowing ifdef's to be removed.
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xace.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Xext/xace.h b/Xext/xace.h index 6cb4b4f5d..6f998951e 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -20,6 +20,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACE_H #define _XACE_H +/* Hook return codes */ +#define SecurityErrorOperation 0 +#define SecurityAllowOperation 1 +#define SecurityIgnoreOperation 2 + +#ifdef XACE + #define XACE_EXTENSION_NAME "XAccessControlExtension" #define XACE_MAJOR_VERSION 1 #define XACE_MINOR_VERSION 0 @@ -75,11 +82,6 @@ extern int XaceHook( /* From the original Security extension... */ -/* Hook return codes */ -#define SecurityAllowOperation 0 -#define SecurityIgnoreOperation 1 -#define SecurityErrorOperation 2 - /* Proc vectors for untrusted clients, swapped and unswapped versions. * These are the same as the normal proc vectors except that extensions * that haven't declared themselves secure will have ProcBadRequest plugged @@ -100,4 +102,18 @@ extern void XaceCensorImage( char * pBuf ); +#else /* XACE */ + +/* Define calls away when XACE is not being built. */ + +#ifdef __GNUC__ +#define XaceHook(args...) SecurityAllowOperation +#define XaceCensorImage(args...) { ; } +#else +#define XaceHook(...) SecurityAllowOperation +#define XaceCensorImage(...) { ; } +#endif + +#endif /* XACE */ + #endif /* _XACE_H */ |