xtsol.patch revision 1295
1276N/A# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
606N/A#
606N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
1088N/A
1124N/Adiff --git a/Makefile.am b/Makefile.am
1265N/Aindex b1408f2..54d64ab 100644
1124N/A--- a/Makefile.am
1124N/A+++ b/Makefile.am
705N/A@@ -17,6 +17,10 @@ if RECORD
705N/A RECORD_DIR=record
705N/A endif
705N/A
705N/A+if BUILD_TSOL_MODULE
705N/A+TSOL_DIR=tsol
705N/A+endif
705N/A+
705N/A SUBDIRS = \
705N/A doc \
1265N/A man \
1265N/A@@ -38,6 +42,7 @@ SUBDIRS = \
705N/A $(COMPOSITE_DIR) \
705N/A $(GLX_DIR) \
705N/A IA \
705N/A+ $(TSOL_DIR) \
705N/A exa \
705N/A config \
851N/A hw \
1124N/Adiff --git a/Xext/security.c b/Xext/security.c
1276N/Aindex 3699510..843a33a 100644
1124N/A--- a/Xext/security.c
1124N/A+++ b/Xext/security.c
1276N/A@@ -1082,3 +1082,27 @@ SecurityExtensionInit(INITARGS)
705N/A /* Label objects that were created before we could register ourself */
705N/A SecurityLabelInitial();
705N/A }
705N/A+
705N/A+/* API needed for Xtsol module to get/set client trustLevel */
705N/A+_X_EXPORT unsigned int
705N/A+getClientTrustLevel(ClientPtr client)
705N/A+{
705N/A+ SecurityStateRec *state;
705N/A+
705N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
705N/A+
705N/A+ return state->trustLevel;
705N/A+}
705N/A+
705N/A+_X_EXPORT unsigned int
705N/A+setClientTrustLevel(ClientPtr client, unsigned int newLevel)
705N/A+{
705N/A+ SecurityStateRec *state;
705N/A+ unsigned int oldLevel;
705N/A+
705N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
705N/A+ oldLevel = state->trustLevel;
705N/A+ state->trustLevel = newLevel;
705N/A+
705N/A+ return oldLevel;
705N/A+}
1124N/Adiff --git a/Xext/securitysrv.h b/Xext/securitysrv.h
1276N/Aindex 8904242..56dbfc6 100644
1124N/A--- a/Xext/securitysrv.h
1124N/A+++ b/Xext/securitysrv.h
1276N/A@@ -79,4 +79,8 @@ typedef struct {
705N/A /* Give this value or higher to the -audit option to get security messages */
705N/A #define SECURITY_AUDIT_LEVEL 4
705N/A
705N/A+/* API needed for Xtsol module to get/set client trustLevel */
851N/A+extern _X_EXPORT unsigned int getClientTrustLevel(ClientPtr client);
851N/A+extern _X_EXPORT unsigned int setClientTrustLevel(ClientPtr client, unsigned int newLevel);
705N/A+
1276N/A #endif /* _SECURITY_SRV_H */
1124N/Adiff --git a/configure.ac b/configure.ac
1276N/Aindex a7c8900..4ad4011 100644
1124N/A--- a/configure.ac
1124N/A+++ b/configure.ac
1265N/A@@ -221,6 +221,14 @@ dnl Find the math libary, then check for cbrt function in it.
98N/A AC_CHECK_LIB(m, sqrt)
1265N/A AC_CHECK_FUNCS([cbrt])
98N/A
196N/A+dnl Check for libtsol for Solaris Trusted Extensions module
196N/A+AC_CHECK_LIB(tsol, bsllow, [BUILD_TSOL_MODULE=yes], [BUILD_TSOL_MODULE=no])
98N/A+AM_CONDITIONAL(BUILD_TSOL_MODULE, [test x$BUILD_TSOL_MODULE = xyes])
235N/A+if test "x$BUILD_TSOL_MODULE" = xyes; then
606N/A+ TSOL_LIB='$(top_builddir)/tsol/libxtsol.la'
606N/A+ TSOL_SYS_LIBS='-ltsol -ltsnet -lsecdb -lbsm'
235N/A+fi
98N/A+
98N/A AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
98N/A
98N/A dnl AGPGART headers
1265N/A@@ -1500,6 +1508,8 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
235N/A if test "x$XVFB" = xyes; then
1124N/A 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"
851N/A XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
851N/A+ XVFB_LIBS="$XVFB_LIBS $TSOL_LIB"
851N/A+ XVFB_SYS_LIBS="$XVFB_SYS_LIBS $TSOL_SYS_LIBS"
235N/A AC_SUBST([XVFB_LIBS])
606N/A AC_SUBST([XVFB_SYS_LIBS])
235N/A fi
1265N/A@@ -1521,6 +1531,8 @@ if test "x$XNEST" = xyes; then
851N/A fi
1265N/A 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"
851N/A XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
851N/A+ XNEST_LIBS="$XNEST_LIBS $TSOL_LIB"
851N/A+ XNEST_SYS_LIBS="$XNEST_SYS_LIBS $TSOL_SYS_LIBS"
235N/A AC_SUBST([XNEST_LIBS])
606N/A AC_SUBST([XNEST_SYS_LIBS])
235N/A fi
1265N/A@@ -2057,6 +2069,7 @@ if test "$KDRIVE" = yes; then
606N/A KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
606N/A
1124N/A 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"
851N/A+ KDRIVE_PURE_LIBS="$KDRIVE_PURE_LIBS $TSOL_LIB"
851N/A KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
235N/A case $host_os in
235N/A *linux*)
1265N/A@@ -2247,3 +2260,6 @@ xorg-server.pc
98N/A
98N/A # Add Sun IA extension
98N/A AC_OUTPUT([IA/Makefile])
98N/A+
98N/A+# Add Sun Trusted Extensions extension
98N/A+AC_OUTPUT([tsol/Makefile])
1124N/Adiff --git a/dix/dispatch.c b/dix/dispatch.c
1276N/Aindex 104dcc9..5a80c13 100644
1124N/A--- a/dix/dispatch.c
1124N/A+++ b/dix/dispatch.c
1276N/A@@ -73,8 +73,8 @@ Equipment Corporation.
98N/A
98N/A ******************************************************************/
98N/A
98N/A-/* XSERVER_DTRACE additions:
1124N/A- * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
98N/A+/*
943N/A+ * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
98N/A *
98N/A * Permission is hereby granted, free of charge, to any person obtaining a
879N/A * copy of this software and associated documentation files (the "Software"),
1276N/A@@ -162,6 +162,10 @@ int connBlockScreenStart;
98N/A
606N/A static void KillAllClients(void);
98N/A
98N/A+#ifdef TSOL
98N/A+SecurityHookPtr pSecHook = NULL;
98N/A+#endif /* TSOL */
98N/A+
1276N/A static int nextFreeClientID; /* always MIN free client ID */
98N/A
1276N/A static int nClients; /* number of authorized clients */
1276N/A@@ -884,7 +888,12 @@ ProcCirculateWindow(ClientPtr client)
1088N/A return Success;
606N/A }
606N/A
606N/A-static int
606N/A+#ifdef TSOL
606N/A+_X_EXPORT
606N/A+#else
606N/A+static
606N/A+#endif
606N/A+int
1276N/A GetGeometry(ClientPtr client, xGetGeometryReply * rep)
606N/A {
606N/A DrawablePtr pDraw;
1276N/A@@ -1964,7 +1973,12 @@ ProcPutImage(ClientPtr client)
1276N/A return Success;
606N/A }
606N/A
606N/A-static int
606N/A+#ifdef TSOL
606N/A+_X_EXPORT
606N/A+#else
606N/A+static
606N/A+#endif
606N/A+int
1276N/A DoGetImage(ClientPtr client, int format, Drawable drawable,
1276N/A int x, int y, int width, int height,
1276N/A Mask planemask, xGetImageReply ** im_return)
1188N/Adiff --git a/dix/events.c b/dix/events.c
1276N/Aindex 0e4ba86..66e9104 100644
1188N/A--- a/dix/events.c
1188N/A+++ b/dix/events.c
1276N/A@@ -2723,6 +2723,9 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
1188N/A *
1188N/A * @returns the window at the given coordinates.
1188N/A */
1188N/A+#ifdef TSOL
1188N/A+_X_EXPORT
1188N/A+#endif
1188N/A WindowPtr
1188N/A XYToWindow(SpritePtr pSprite, int x, int y)
1188N/A {
1124N/Adiff --git a/dix/window.c b/dix/window.c
1276N/Aindex a31e78f..4cf5fdf 100644
1124N/A--- a/dix/window.c
1124N/A+++ b/dix/window.c
1276N/A@@ -96,6 +96,34 @@ Equipment Corporation.
98N/A
98N/A ******************************************************************/
98N/A
943N/A+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
98N/A+ *
98N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
98N/A+ * copy of this software and associated documentation files (the
98N/A+ * "Software"), to deal in the Software without restriction, including
98N/A+ * without limitation the rights to use, copy, modify, merge, publish,
98N/A+ * distribute, and/or sell copies of the Software, and to permit persons
98N/A+ * to whom the Software is furnished to do so, provided that the above
98N/A+ * copyright notice(s) and this permission notice appear in all copies of
98N/A+ * the Software and that both the above copyright notice(s) and this
98N/A+ * permission notice appear in supporting documentation.
98N/A+ *
98N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
98N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
98N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
98N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
98N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
98N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
98N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
98N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
98N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A+ *
98N/A+ * Except as contained in this notice, the name of a copyright holder
98N/A+ * shall not be used in advertising or otherwise to promote the sale, use
98N/A+ * or other dealings in this Software without prior written authorization
98N/A+ * of the copyright holder.
98N/A+ */
1276N/A+
98N/A #ifdef HAVE_DIX_CONFIG_H
98N/A #include <dix-config.h>
1276N/A #endif
1276N/A@@ -180,6 +208,11 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind);
705N/A
705N/A #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
98N/A
98N/A+#ifdef TSOL
98N/A+#include "extnsionst.h"
98N/A+extern SecurityHookPtr pSecHook;
98N/A+#endif /* TSOL */
98N/A+
1265N/A #ifdef COMPOSITE
1265N/A static const char *overlay_win_name = "<composite overlay>";
1265N/A #endif
1276N/A@@ -1833,7 +1866,12 @@ IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib)
1088N/A return Below;
98N/A }
98N/A
98N/A-static BoxPtr
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
98N/A+BoxPtr
1276N/A WindowExtents(WindowPtr pWin, BoxPtr pBox)
1276N/A {
1276N/A pBox->x1 = pWin->drawable.x - wBorderWidth(pWin);
1276N/A@@ -1860,7 +1898,12 @@ MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox)
98N/A return pRgn;
98N/A }
98N/A
98N/A-static Bool
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
98N/A+Bool
1276N/A ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, WindowPtr pSib, BoxPtr pSibBox)
1276N/A {
1276N/A RegionPtr pWinRgn, pSibRgn;
1276N/A@@ -2036,7 +2079,12 @@ WhereDoIGoInTheStack(WindowPtr pWin,
98N/A }
98N/A }
98N/A
98N/A-static void
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
98N/A+void
1276N/A ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
1276N/A {
1276N/A /* Note that pSib might be NULL */
1124N/Adiff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
1276N/Aindex b38d265..4299257 100644
1124N/A--- a/hw/xfree86/common/xf86Config.c
1124N/A+++ b/hw/xfree86/common/xf86Config.c
1124N/A@@ -126,6 +126,7 @@ static ModuleDefault ModuleDefaults[] = {
1276N/A {.name = "dri2",.toLoad = TRUE,.load_opt = NULL},
606N/A #endif
1276N/A {.name = "ia",.toLoad = TRUE,.load_opt = NULL},
1276N/A+ {.name = "xtsol",.toLoad = TRUE,.load_opt = NULL},
1276N/A {.name = NULL,.toLoad = FALSE,.load_opt = NULL}
606N/A };
98N/A
1124N/Adiff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
1265N/Aindex 02a6d0d..00f8021 100644
1124N/A--- a/hw/xfree86/dixmods/Makefile.am
1124N/A+++ b/hw/xfree86/dixmods/Makefile.am
1265N/A@@ -73,3 +73,11 @@ libia_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/IA
606N/A libia_la_LDFLAGS = -avoid-version
633N/A libia_la_LIBADD = $(top_builddir)/IA/libIA.la
606N/A libia_la_SOURCES = iamodule.c
98N/A+
98N/A+if BUILD_TSOL_MODULE
98N/A+# Sun Trusted Extensions extension module additions
98N/A+extsmodule_LTLIBRARIES += libxtsol.la
98N/A+libxtsol_la_LDFLAGS = -avoid-version
1188N/A+libxtsol_la_LIBADD = $(top_builddir)/tsol/libxtsol.la $(PIXMAN_LIBS)
98N/A+libxtsol_la_SOURCES = tsolmodule.c
98N/A+endif
1124N/Adiff --git a/include/dix.h b/include/dix.h
1276N/Aindex d604e06..012a5a5 100644
1124N/A--- a/include/dix.h
1124N/A+++ b/include/dix.h
1276N/A@@ -164,6 +164,14 @@ extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
705N/A
851N/A extern _X_HIDDEN Bool CreateConnectionBlock(void);
1276N/A
633N/A+#ifdef TSOL
851N/A+extern _X_EXPORT int DoGetImage(ClientPtr client, int format, Drawable drawable,
1276N/A+ int x, int y, int width, int height,
1276N/A+ Mask planemask, xGetImageReply **im_return);
633N/A+
851N/A+extern _X_EXPORT int GetGeometry(ClientPtr client, xGetGeometryReply *rep);
633N/A+#endif
633N/A+
633N/A /* dixutils.c */
633N/A
1276N/A extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
1124N/Adiff --git a/include/extnsionst.h b/include/extnsionst.h
1276N/Aindex e825236..5417c57 100644
1124N/A--- a/include/extnsionst.h
1124N/A+++ b/include/extnsionst.h
1276N/A@@ -44,6 +44,34 @@ SOFTWARE.
98N/A
98N/A ******************************************************************/
98N/A
943N/A+/* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
98N/A+ *
98N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
98N/A+ * copy of this software and associated documentation files (the
98N/A+ * "Software"), to deal in the Software without restriction, including
98N/A+ * without limitation the rights to use, copy, modify, merge, publish,
98N/A+ * distribute, and/or sell copies of the Software, and to permit persons
98N/A+ * to whom the Software is furnished to do so, provided that the above
98N/A+ * copyright notice(s) and this permission notice appear in all copies of
98N/A+ * the Software and that both the above copyright notice(s) and this
98N/A+ * permission notice appear in supporting documentation.
98N/A+ *
98N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
98N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
98N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
98N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
98N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
98N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
98N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
98N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
98N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A+ *
98N/A+ * Except as contained in this notice, the name of a copyright holder
98N/A+ * shall not be used in advertising or otherwise to promote the sale, use
98N/A+ * or other dealings in this Software without prior written authorization
98N/A+ * of the copyright holder.
98N/A+ */
98N/A+
98N/A #ifndef EXTENSIONSTRUCT_H
1276N/A #define EXTENSIONSTRUCT_H
98N/A
1276N/A@@ -54,6 +82,10 @@ SOFTWARE.
98N/A #include "gc.h"
606N/A #include "privates.h"
98N/A
98N/A+#ifdef TSOL
98N/A+#include "inputstr.h"
98N/A+#endif /* TSOL */
98N/A+
98N/A typedef struct _ExtensionEntry {
98N/A int index;
1276N/A void (*CloseDown) ( /* called at server shutdown */
1276N/A@@ -109,4 +141,20 @@ CheckExtension(const char *extname);
1276N/A extern _X_EXPORT ExtensionEntry *
1276N/A GetExtensionEntry(int major);
98N/A
98N/A+#ifdef TSOL
98N/A+typedef struct
98N/A+{
606N/A+ XID (*CheckAuthorization)(unsigned int, char *, unsigned int,
1295N/A+ char *, ClientPtr , const char **);
98N/A+ int (*ChangeWindowProperty)(ClientPtr, WindowPtr, Atom, Atom, int, int,
98N/A+ unsigned long, pointer, Bool);
98N/A+ int (*DeleteProperty)(ClientPtr, WindowPtr, Atom);
98N/A+ void (*DeleteClientFromAnySelections)(ClientPtr);
98N/A+ void (*DeleteWindowFromAnySelections)(WindowPtr);
98N/A+} SecurityHook, *SecurityHookPtr;
98N/A+
851N/A+extern _X_EXPORT SecurityHookPtr pSecHook;
98N/A+
98N/A+#endif /* TSOL */
98N/A+
1276N/A #endif /* EXTENSIONSTRUCT_H */
1124N/Adiff --git a/include/input.h b/include/input.h
1276N/Aindex d891fe5..63a7e79 100644
1124N/A--- a/include/input.h
1124N/A+++ b/include/input.h
1276N/A@@ -397,7 +397,7 @@ extern void NoteLedState(DeviceIntPtr /*keybd */ ,
1276N/A int /*led */ ,
1276N/A Bool /*on */ );
1088N/A
1276N/A-extern void MaybeStopHint(DeviceIntPtr /*device */ ,
1276N/A+extern _X_EXPORT void MaybeStopHint(DeviceIntPtr /*device */ ,
1276N/A ClientPtr /*client */ );
1088N/A
1276N/A extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
1124N/Adiff --git a/include/window.h b/include/window.h
1276N/Aindex 64c56ae..f3a8a37 100644
1124N/A--- a/include/window.h
1124N/A+++ b/include/window.h
1276N/A@@ -229,4 +229,10 @@ extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
1265N/A extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
1265N/A extern _X_EXPORT void PrintWindowTree(void);
633N/A
633N/A+#ifdef TSOL
633N/A+# include "validate.h" /* needed for VTKind enum definition */
1276N/A+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib,
1276N/A+ VTKind kind);
633N/A+#endif
633N/A+
1276N/A #endif /* WINDOW_H */
1124N/Adiff --git a/mi/miinitext.c b/mi/miinitext.c
1276N/Aindex 433aec7..08b9309 100644
1124N/A--- a/mi/miinitext.c
1124N/A+++ b/mi/miinitext.c
1276N/A@@ -65,6 +65,7 @@ SOFTWARE.
1088N/A #undef DAMAGE
1088N/A #undef COMPOSITE
1088N/A #undef MITSHM
1088N/A+#undef TSOL
1088N/A #endif
1088N/A
1088N/A #ifdef HAVE_XNEST_CONFIG_H
1276N/A@@ -158,6 +159,9 @@ extern Bool noGEExtension;
235N/A #ifdef SolarisIAExtension
235N/A Bool noIAExtension;
235N/A #endif
235N/A+#ifdef TSOL
235N/A+Bool noXTSolExtension;
235N/A+#endif
235N/A
235N/A #ifndef XFree86LOADER
235N/A #define INITARGS void
1276N/A@@ -193,6 +197,9 @@ typedef void (*InitExtension) (INITARGS);
235N/A #include <X11/extensions/interactive.h>
1088N/A #include "../IA/interactive_srv.h"
235N/A #endif
235N/A+#ifdef TSOL
1088N/A+#include "../tsol/tsolextension.h"
235N/A+#endif
235N/A
235N/A /* FIXME: this whole block of externs should be from the appropriate headers */
705N/A #ifdef MITSHM
1276N/A@@ -319,6 +326,9 @@ static ExtensionToggle ExtensionToggleList[] = {
705N/A #ifdef SolarisIAExtension
705N/A { IANAME /* "SolarisIA" */, &noIAExtension },
1088N/A #endif
235N/A+#ifdef TSOL
235N/A+ { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
1088N/A+#endif
705N/A #ifdef RES
1276N/A {"X-Resource", &noResExtension},
235N/A #endif
1276N/A@@ -512,6 +522,11 @@ InitExtensions(int argc, char *argv[])
235N/A #ifdef SolarisIAExtension
235N/A if (!noIAExtension) IAExtensionInit();
235N/A #endif
235N/A+#ifdef TSOL
235N/A+ if (!noXTSolExtension) {
1276N/A+ TsolExtensionInit();
235N/A+ }
235N/A+#endif
235N/A }
235N/A
1276N/A #else /* XFree86LOADER */
1124N/Adiff --git a/os/connection.c b/os/connection.c
1276N/Aindex 1099752..f9ba2d7 100644
1124N/A--- a/os/connection.c
1124N/A+++ b/os/connection.c
1276N/A@@ -43,6 +43,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
98N/A SOFTWARE.
98N/A
98N/A ******************************************************************/
943N/A+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
98N/A+ *
98N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
98N/A+ * copy of this software and associated documentation files (the
98N/A+ * "Software"), to deal in the Software without restriction, including
98N/A+ * without limitation the rights to use, copy, modify, merge, publish,
98N/A+ * distribute, and/or sell copies of the Software, and to permit persons
98N/A+ * to whom the Software is furnished to do so, provided that the above
98N/A+ * copyright notice(s) and this permission notice appear in all copies of
98N/A+ * the Software and that both the above copyright notice(s) and this
98N/A+ * permission notice appear in supporting documentation.
98N/A+ *
98N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
98N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
98N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
98N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
98N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
98N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
98N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
98N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
98N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A+ *
98N/A+ * Except as contained in this notice, the name of a copyright holder
98N/A+ * shall not be used in advertising or otherwise to promote the sale, use
98N/A+ * or other dealings in this Software without prior written authorization
98N/A+ * of the copyright holder.
98N/A+ */
98N/A /*****************************************************************
98N/A * Stuff to create connections --- OS dependent
98N/A *
1276N/A@@ -254,6 +281,11 @@ static int ListenTransCount;
98N/A
1276N/A static void ErrorConnMax(XtransConnInfo /* trans_conn */ );
98N/A
98N/A+#ifdef TSOL
98N/A+#include "extnsionst.h"
98N/A+extern SecurityHookPtr pSecHook;
98N/A+#endif /* TSOL */
98N/A+
98N/A static XtransConnInfo
1276N/A lookup_trans_conn(int fd)
98N/A {
1276N/A@@ -638,6 +670,12 @@ ClientAuthorized(ClientPtr client,
1276N/A priv = (OsCommPtr) client->osPrivate;
705N/A trans_conn = priv->trans_conn;
98N/A
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
1276N/A+ auth_id = (*pSecHook->CheckAuthorization) (proto_n, auth_proto,
1276N/A+ string_n, auth_string, client, &reason);
98N/A+ else
98N/A+#endif /* TSOL */
705N/A /* Allow any client to connect without authorization on a launchd socket,
705N/A because it is securely created -- this prevents a race condition on launch */
1276N/A if (trans_conn->flags & TRANS_NOXAUTH) {