diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-12-18 13:58:35 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-12-18 13:58:35 -0500 |
commit | f87e66486c3610c56888915b66ae5ab0af03da8b (patch) | |
tree | 23960b5c014d3a703234a5710ca32e952a86b4b7 | |
parent | 777408914dbf395e9969e3f34720286e6f740369 (diff) |
xace: Export wrappers around two Xtrans functions used by modules.
Don't know a better way to do this, since Xtrans isn't a library that
can be linked into modules.
-rw-r--r-- | Xext/xace.c | 20 | ||||
-rw-r--r-- | Xext/xace.h | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Xext/xace.c b/Xext/xace.c index c7583197d..7e82f810d 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -29,6 +29,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "gcstruct.h" #include "xacestr.h" +#define XSERV_t +#define TRANS_SERVER +#include <X11/Xtrans/Xtrans.h> +#include "../os/osdep.h" + _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; /* Special-cased hook functions. Called by Xserver. @@ -339,3 +344,18 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, REGION_UNINIT(pScreen, &imageRegion); REGION_UNINIT(pScreen, &censorRegion); } /* XaceCensorImage */ + +/* + * Xtrans wrappers for use by modules + */ +int XaceGetConnectionNumber(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + return _XSERVTransGetConnectionNumber(ci); +} + +int XaceIsLocal(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + return _XSERVTransIsLocal(ci); +} diff --git a/Xext/xace.h b/Xext/xace.h index 542b1574a..3b3e8785f 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -85,6 +85,10 @@ void XaceHookAuditEnd(ClientPtr ptr, int result); #define XaceDeleteCallback(hook,callback,data) \ DeleteCallback(XaceHooks+(hook), callback, data) +/* XTrans wrappers for use by security modules + */ +_X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr); +_X_EXPORT int XaceIsLocal(ClientPtr ptr); /* From the original Security extension... */ |