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 /dix/extension.c | |
parent | a5d6499d666fea4a9988118ddd3a5e4c9cfcc32c (diff) |
Define calls away when not building XACE, allowing ifdef's to be removed.
Diffstat (limited to 'dix/extension.c')
-rw-r--r-- | dix/extension.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/dix/extension.c b/dix/extension.c index fe779b2be..29cae8676 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -59,9 +59,7 @@ SOFTWARE. #include "gcstruct.h" #include "scrnintstr.h" #include "dispatch.h" -#ifdef XACE #include "xace.h" -#endif #define EXTENSION_BASE 128 #define EXTENSION_EVENT_BASE 64 @@ -256,11 +254,9 @@ GetExtensionEntry(int major) _X_EXPORT void DeclareExtensionSecurity(char *extname, Bool secure) { -#ifdef XACE int i = FindExtension(extname, strlen(extname)); if (i >= 0) XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure); -#endif } _X_EXPORT unsigned short @@ -336,12 +332,7 @@ ProcQueryExtension(ClientPtr client) else { i = FindExtension((char *)&stuff[1], stuff->nbytes); - if (i < 0 -#ifdef XACE - /* call callbacks to find out whether to show extension */ - || !XaceHook(XACE_EXT_ACCESS, client, extensions[i]) -#endif - ) + if (i < 0 || !XaceHook(XACE_EXT_ACCESS, client, extensions[i])) reply.present = xFalse; else { @@ -376,11 +367,10 @@ ProcListExtensions(ClientPtr client) for (i=0; i<NumExtensions; i++) { -#ifdef XACE /* call callbacks to find out whether to show extension */ if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i])) continue; -#endif + total_length += strlen(extensions[i]->name) + 1; reply.nExtensions += 1 + extensions[i]->num_aliases; for (j = extensions[i]->num_aliases; --j >= 0;) @@ -393,10 +383,9 @@ ProcListExtensions(ClientPtr client) for (i=0; i<NumExtensions; i++) { int len; -#ifdef XACE if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i])) continue; -#endif + *bufptr++ = len = strlen(extensions[i]->name); memmove(bufptr, extensions[i]->name, len); bufptr += len; |