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 +#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... */