xtsol.patch revision 1351
0N/A# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/A# Permission is hereby granted, free of charge, to any person obtaining a
0N/A# copy of this software and associated documentation files (the "Software"),
0N/A# to deal in the Software without restriction, including without limitation
0N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0N/A# and/or sell copies of the Software, and to permit persons to whom the
0N/A# Software is furnished to do so, subject to the following conditions:
0N/A#
0N/A# The above copyright notice and this permission notice (including the next
0N/A# paragraph) shall be included in all copies or substantial portions of the
0N/A# Software.
0N/A#
0N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1105N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1186N/A# DEALINGS IN THE SOFTWARE.
0N/A
1186N/Adiff --git a/Makefile.am b/Makefile.am
1186N/Aindex 7ce17e3..8d5c65d 100644
1186N/A--- a/Makefile.am
1186N/A+++ b/Makefile.am
1140N/A@@ -17,6 +17,10 @@ if RECORD
1186N/A RECORD_DIR=record
1186N/A endif
1186N/A
1186N/A+if BUILD_TSOL_MODULE
1186N/A+TSOL_DIR=tsol
1186N/A+endif
1186N/A+
1186N/A SUBDIRS = \
1186N/A doc \
1186N/A man \
1186N/A@@ -38,6 +42,7 @@ SUBDIRS = \
1186N/A $(COMPOSITE_DIR) \
1186N/A $(GLX_DIR) \
1186N/A IA \
1186N/A+ $(TSOL_DIR) \
1186N/A exa \
1186N/A config \
1186N/A hw \
1186N/Adiff --git a/Xext/security.c b/Xext/security.c
1186N/Aindex 6cc9aa0..3fed0b3 100644
0N/A--- a/Xext/security.c
0N/A+++ b/Xext/security.c
1186N/A@@ -1084,3 +1084,27 @@ SecurityExtensionInit(void)
1186N/A /* Label objects that were created before we could register ourself */
1186N/A SecurityLabelInitial();
1186N/A }
1186N/A+
1186N/A+/* API needed for Xtsol module to get/set client trustLevel */
1186N/A+_X_EXPORT unsigned int
1186N/A+getClientTrustLevel(ClientPtr client)
1186N/A+{
1186N/A+ SecurityStateRec *state;
1186N/A+
1186N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
1186N/A+
1186N/A+ return state->trustLevel;
1186N/A+}
1186N/A+
1186N/A+_X_EXPORT unsigned int
1186N/A+setClientTrustLevel(ClientPtr client, unsigned int newLevel)
0N/A+{
1186N/A+ SecurityStateRec *state;
1186N/A+ unsigned int oldLevel;
1186N/A+
1186N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
1186N/A+ oldLevel = state->trustLevel;
1186N/A+ state->trustLevel = newLevel;
1186N/A+
1186N/A+ return oldLevel;
1186N/A+}
1186N/Adiff --git a/Xext/securitysrv.h b/Xext/securitysrv.h
1186N/Aindex 8904242..56dbfc6 100644
1186N/A--- a/Xext/securitysrv.h
1186N/A+++ b/Xext/securitysrv.h
1186N/A@@ -79,4 +79,8 @@ typedef struct {
1186N/A /* Give this value or higher to the -audit option to get security messages */
1186N/A #define SECURITY_AUDIT_LEVEL 4
1186N/A
1186N/A+/* API needed for Xtsol module to get/set client trustLevel */
+extern _X_EXPORT unsigned int getClientTrustLevel(ClientPtr client);
+extern _X_EXPORT unsigned int setClientTrustLevel(ClientPtr client, unsigned int newLevel);
+
#endif /* _SECURITY_SRV_H */
diff --git a/configure.ac b/configure.ac
index 5a8e173..017fcd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,6 +223,14 @@ dnl Find the math libary, then check for cbrt function in it.
AC_CHECK_LIB(m, sqrt)
AC_CHECK_FUNCS([cbrt])
+dnl Check for libtsol for Solaris Trusted Extensions module
+AC_CHECK_LIB(tsol, bsllow, [BUILD_TSOL_MODULE=yes], [BUILD_TSOL_MODULE=no])
+AM_CONDITIONAL(BUILD_TSOL_MODULE, [test x$BUILD_TSOL_MODULE = xyes])
+if test "x$BUILD_TSOL_MODULE" = xyes; then
+ TSOL_LIB='$(top_builddir)/tsol/libxtsol.la'
+ TSOL_SYS_LIBS='-ltsol -ltsnet -lsecdb -lbsm'
+fi
+
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
dnl AGPGART headers
@@ -1569,6 +1577,8 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
if test "x$XVFB" = xyes; then
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
+ XVFB_LIBS="$XVFB_LIBS $TSOL_LIB"
+ XVFB_SYS_LIBS="$XVFB_SYS_LIBS $TSOL_SYS_LIBS"
AC_SUBST([XVFB_LIBS])
AC_SUBST([XVFB_SYS_LIBS])
fi
@@ -1590,6 +1600,8 @@ if test "x$XNEST" = xyes; then
fi
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
+ XNEST_LIBS="$XNEST_LIBS $TSOL_LIB"
+ XNEST_SYS_LIBS="$XNEST_SYS_LIBS $TSOL_SYS_LIBS"
AC_SUBST([XNEST_LIBS])
AC_SUBST([XNEST_SYS_LIBS])
fi
@@ -2132,6 +2144,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
+ KDRIVE_PURE_LIBS="$KDRIVE_PURE_LIBS $TSOL_LIB"
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
case $host_os in
*linux*)
@@ -2319,3 +2332,6 @@ xorg-server.pc
# Add Sun IA extension
AC_OUTPUT([IA/Makefile])
+
+# Add Sun Trusted Extensions extension
+AC_OUTPUT([tsol/Makefile])
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0ce10c2..dd70ee7 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -73,8 +73,8 @@ Equipment Corporation.
******************************************************************/
-/* XSERVER_DTRACE additions:
- * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
+/*
+ * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -162,6 +162,10 @@ int connBlockScreenStart;
static void KillAllClients(void);
+#ifdef TSOL
+SecurityHookPtr pSecHook = NULL;
+#endif /* TSOL */
+
static int nextFreeClientID; /* always MIN free client ID */
static int nClients; /* number of authorized clients */
@@ -885,7 +889,12 @@ ProcCirculateWindow(ClientPtr client)
return Success;
}
-static int
+#ifdef TSOL
+_X_EXPORT
+#else
+static
+#endif
+int
GetGeometry(ClientPtr client, xGetGeometryReply * rep)
{
DrawablePtr pDraw;
@@ -1966,7 +1975,12 @@ ProcPutImage(ClientPtr client)
return Success;
}
-static int
+#ifdef TSOL
+_X_EXPORT
+#else
+static
+#endif
+int
DoGetImage(ClientPtr client, int format, Drawable drawable,
int x, int y, int width, int height,
Mask planemask, xGetImageReply ** im_return)
diff --git a/dix/events.c b/dix/events.c
index ddb5b34..14c2833 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2771,6 +2771,9 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
*
* @returns the window at the given coordinates.
*/
+#ifdef TSOL
+_X_EXPORT
+#endif
WindowPtr
XYToWindow(SpritePtr pSprite, int x, int y)
{
diff --git a/dix/window.c b/dix/window.c
index 49ef4a0..3f2a99e 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -96,6 +96,34 @@ Equipment Corporation.
******************************************************************/
+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -180,6 +208,11 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind);
#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
+#ifdef TSOL
+#include "extnsionst.h"
+extern SecurityHookPtr pSecHook;
+#endif /* TSOL */
+
#ifdef COMPOSITE
static const char *overlay_win_name = "<composite overlay>";
#endif
@@ -1831,7 +1864,12 @@ IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib)
return Below;
}
-static BoxPtr
+#ifdef TSOL
+_X_EXPORT
+#else
+static
+#endif
+BoxPtr
WindowExtents(WindowPtr pWin, BoxPtr pBox)
{
pBox->x1 = pWin->drawable.x - wBorderWidth(pWin);
@@ -1858,7 +1896,12 @@ MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox)
return pRgn;
}
-static Bool
+#ifdef TSOL
+_X_EXPORT
+#else
+static
+#endif
+Bool
ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, WindowPtr pSib, BoxPtr pSibBox)
{
RegionPtr pWinRgn, pSibRgn;
@@ -2034,7 +2077,12 @@ WhereDoIGoInTheStack(WindowPtr pWin,
}
}
-static void
+#ifdef TSOL
+_X_EXPORT
+#else
+static
+#endif
+void
ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
{
/* Note that pSib might be NULL */
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 907a103..af8a89e 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -118,6 +118,7 @@ static ModuleDefault ModuleDefaults[] = {
{.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
#endif
{.name = "ia",.toLoad = TRUE,.load_opt = NULL},
+ {.name = "xtsol",.toLoad = TRUE,.load_opt = NULL},
{.name = NULL,.toLoad = FALSE,.load_opt = NULL}
};
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index fd524c5..c02677a 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -56,3 +56,11 @@ libia_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/IA
libia_la_LDFLAGS = -avoid-version
libia_la_LIBADD = $(top_builddir)/IA/libIA.la
libia_la_SOURCES = iamodule.c
+
+if BUILD_TSOL_MODULE
+# Sun Trusted Extensions extension module additions
+extsmodule_LTLIBRARIES += libxtsol.la
+libxtsol_la_LDFLAGS = -avoid-version
+libxtsol_la_LIBADD = $(top_builddir)/tsol/libxtsol.la $(PIXMAN_LIBS)
+libxtsol_la_SOURCES = tsolmodule.c
+endif
diff --git a/include/dix.h b/include/dix.h
index 74123b5..6e53887 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -166,6 +166,14 @@ extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
extern _X_HIDDEN Bool CreateConnectionBlock(void);
+#ifdef TSOL
+extern _X_EXPORT int DoGetImage(ClientPtr client, int format, Drawable drawable,
+ int x, int y, int width, int height,
+ Mask planemask, xGetImageReply **im_return);
+
+extern _X_EXPORT int GetGeometry(ClientPtr client, xGetGeometryReply *rep);
+#endif
+
/* dixutils.c */
extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
diff --git a/include/extnsionst.h b/include/extnsionst.h
index e825236..d3e70d1 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -44,6 +44,34 @@ SOFTWARE.
******************************************************************/
+/* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
#ifndef EXTENSIONSTRUCT_H
#define EXTENSIONSTRUCT_H
@@ -54,6 +82,10 @@ SOFTWARE.
#include "gc.h"
#include "privates.h"
+#ifdef TSOL
+#include "inputstr.h"
+#endif /* TSOL */
+
typedef struct _ExtensionEntry {
int index;
void (*CloseDown) ( /* called at server shutdown */
@@ -109,4 +141,20 @@ CheckExtension(const char *extname);
extern _X_EXPORT ExtensionEntry *
GetExtensionEntry(int major);
+#ifdef TSOL
+typedef struct
+{
+ XID (*CheckAuthorization)(unsigned int, char *, unsigned int,
+ char *, ClientPtr , const char **);
+ int (*ChangeWindowProperty)(ClientPtr, WindowPtr, Atom, Atom, int, int,
+ unsigned long, pointer, Bool);
+ int (*DeleteProperty)(ClientPtr, WindowPtr, Atom);
+ void (*DeleteClientFromAnySelections)(ClientPtr);
+ void (*DeleteWindowFromAnySelections)(WindowPtr);
+} SecurityHook, *SecurityHookPtr;
+
+extern _X_EXPORT SecurityHookPtr pSecHook;
+
+#endif /* TSOL */
+
#endif /* EXTENSIONSTRUCT_H */
diff --git a/include/input.h b/include/input.h
index f8459b8..efb77f7 100644
--- a/include/input.h
+++ b/include/input.h
@@ -397,7 +397,7 @@ extern void NoteLedState(DeviceIntPtr /*keybd */ ,
int /*led */ ,
Bool /*on */ );
-extern void MaybeStopHint(DeviceIntPtr /*device */ ,
+extern _X_EXPORT void MaybeStopHint(DeviceIntPtr /*device */ ,
ClientPtr /*client */ );
extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
diff --git a/include/window.h b/include/window.h
index f8fc2a5..f25a27a 100644
--- a/include/window.h
+++ b/include/window.h
@@ -227,5 +227,11 @@ extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);
+#ifdef TSOL
+#include "validate.h" /* needed for VTKind enum definition */
+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib,
+ VTKind kind);
+#endif
+
extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
#endif /* WINDOW_H */
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 720dca4..26e7f5c 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -90,6 +90,7 @@ SOFTWARE.
#undef DAMAGE
#undef COMPOSITE
#undef MITSHM
+#undef TSOL
#endif
#ifdef HAVE_XNEST_CONFIG_H
@@ -154,6 +155,9 @@ static ExtensionToggle ExtensionToggleList[] = {
#ifdef SolarisIAExtension
{ IANAME /* "SolarisIA" */, &noIAExtension },
#endif
+#ifdef TSOL
+ { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
+#endif
#ifdef RES
{"X-Resource", &noResExtension},
#endif
diff --git a/os/connection.c b/os/connection.c
index 721ad65..62a227c 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -43,6 +43,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
/*****************************************************************
* Stuff to create connections --- OS dependent
*
@@ -255,6 +282,11 @@ static int ListenTransCount;
static void ErrorConnMax(XtransConnInfo /* trans_conn */ );
+#ifdef TSOL
+#include "extnsionst.h"
+extern SecurityHookPtr pSecHook;
+#endif /* TSOL */
+
static XtransConnInfo
lookup_trans_conn(int fd)
{
@@ -667,6 +699,12 @@ ClientAuthorized(ClientPtr client,
priv = (OsCommPtr) client->osPrivate;
trans_conn = priv->trans_conn;
+#ifdef TSOL
+ if (pSecHook)
+ auth_id = (*pSecHook->CheckAuthorization) (proto_n, auth_proto,
+ string_n, auth_string, client, &reason);
+ else
+#endif /* TSOL */
/* Allow any client to connect without authorization on a launchd socket,
because it is securely created -- this prevents a race condition on launch */
if (trans_conn->flags & TRANS_NOXAUTH) {