xtsol.patch revision 1179
1088N/A# Copyright (c) 2006, 2011, 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
1124N/Aindex 4d2e2ca..e14a6e3 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 \
705N/A include \
705N/A@@ -37,6 +41,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
1124N/Aindex 8673880..14bb5cd 100644
1124N/A--- a/Xext/security.c
1124N/A+++ b/Xext/security.c
1124N/A@@ -1144,3 +1144,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
1124N/Aindex 3d3894a..8b7317f 100644
1124N/A--- a/Xext/securitysrv.h
1124N/A+++ b/Xext/securitysrv.h
705N/A@@ -80,4 +80,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+
705N/A #endif /* _SECURITY_SRV_H */
1124N/Adiff --git a/configure.ac b/configure.ac
1179N/Aindex c6cbb69..32a3cce 100644
1124N/A--- a/configure.ac
1124N/A+++ b/configure.ac
1124N/A@@ -227,6 +227,14 @@ dnl Find the math libary
98N/A AC_CHECK_LIB(m, sqrt)
606N/A AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function]))
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
1179N/A@@ -1507,6 +1515,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
1179N/A@@ -1528,6 +1538,8 @@ if test "x$XNEST" = xyes; then
851N/A fi
1124N/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 $DIX_LIB $MAIN_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
1179N/A@@ -2092,6 +2104,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*)
1179N/A@@ -2283,3 +2296,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
1124N/Aindex 7b2132d..63a2378 100644
1124N/A--- a/dix/dispatch.c
1124N/A+++ b/dix/dispatch.c
98N/A@@ -74,8 +74,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"),
879N/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+
98N/A static int nextFreeClientID; /* always MIN free client ID */
98N/A
98N/A static int nClients; /* number of authorized clients */
1124N/A@@ -896,7 +900,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
606N/A GetGeometry(ClientPtr client, xGetGeometryReply *rep)
606N/A {
606N/A DrawablePtr pDraw;
1124N/A@@ -1990,7 +1999,12 @@ ProcPutImage(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
606N/A DoGetImage(ClientPtr client, int format, Drawable drawable,
606N/A int x, int y, int width, int height,
606N/A Mask planemask, xGetImageReply **im_return)
1124N/Adiff --git a/dix/window.c b/dix/window.c
1179N/Aindex 41306b3..6d4db39 100644
1124N/A--- a/dix/window.c
1124N/A+++ b/dix/window.c
851N/A@@ -97,6 +97,33 @@ 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+ */
98N/A
98N/A #ifdef HAVE_DIX_CONFIG_H
98N/A #include <dix-config.h>
1124N/A@@ -175,6 +202,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+
98N/A #ifdef DEBUG
98N/A /******
98N/A * PrintWindowTree
1179N/A@@ -1837,7 +1869,12 @@ IsSiblingAboveMe(
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
98N/A WindowExtents(
606N/A WindowPtr pWin,
606N/A BoxPtr pBox)
1179N/A@@ -1867,7 +1904,12 @@ MakeBoundingRegion (
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
98N/A ShapeOverlap (
98N/A WindowPtr pWin,
98N/A BoxPtr pWinBox,
1179N/A@@ -2067,7 +2109,12 @@ WhereDoIGoInTheStack(
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
98N/A ReflectStackChange(
606N/A WindowPtr pWin,
606N/A WindowPtr pSib,
1124N/Adiff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
1179N/Aindex e1d24e4..9827e4f 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[] = {
606N/A {.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
606N/A #endif
606N/A {.name = "ia", .toLoad = TRUE, .load_opt=NULL},
606N/A+ {.name = "xtsol", .toLoad = TRUE, .load_opt=NULL},
606N/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
1124N/Aindex ea065fa..5e5725e 100644
1124N/A--- a/hw/xfree86/dixmods/Makefile.am
1124N/A+++ b/hw/xfree86/dixmods/Makefile.am
1124N/A@@ -74,3 +74,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
98N/A+libxtsol_la_LIBADD = $(top_builddir)/tsol/libxtsol.la
98N/A+libxtsol_la_SOURCES = tsolmodule.c
98N/A+endif
1124N/Adiff --git a/include/dix.h b/include/dix.h
1124N/Aindex 12e4b59..50c20ed 100644
1124N/A--- a/include/dix.h
1124N/A+++ b/include/dix.h
1124N/A@@ -172,6 +172,15 @@ extern _X_EXPORT void MarkClientException(
851N/A ClientPtr /*client*/);
705N/A
851N/A extern _X_HIDDEN Bool CreateConnectionBlock(void);
851N/A+
633N/A+#ifdef TSOL
851N/A+extern _X_EXPORT int DoGetImage(ClientPtr client, int format, Drawable drawable,
633N/A+ int x, int y, int width, int height,
633N/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
1088N/A extern _X_EXPORT int CompareISOLatin1Lowered(
1124N/Adiff --git a/include/extnsionst.h b/include/extnsionst.h
1124N/Aindex bb66dfb..3a51180 100644
1124N/A--- a/include/extnsionst.h
1124N/A+++ b/include/extnsionst.h
98N/A@@ -45,6 +45,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
98N/A #define EXTENSIONSTRUCT_H
98N/A
606N/A@@ -55,6 +83,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;
98N/A void (* CloseDown)( /* called at server shutdown */
851N/A@@ -108,5 +140,21 @@ extern _X_EXPORT Bool AddExtensionAlias(
851N/A extern _X_EXPORT ExtensionEntry *CheckExtension(const char *extname);
851N/A extern _X_EXPORT ExtensionEntry *GetExtensionEntry(int major);
98N/A
98N/A+#ifdef TSOL
98N/A+typedef struct
98N/A+{
606N/A+ XID (*CheckAuthorization)(unsigned int, char *, unsigned int,
98N/A+ char *, ClientPtr , 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+
98N/A #endif /* EXTENSIONSTRUCT_H */
98N/A
1124N/Adiff --git a/include/input.h b/include/input.h
1179N/Aindex 95aae43..3f8a884 100644
1124N/A--- a/include/input.h
1124N/A+++ b/include/input.h
1179N/A@@ -408,7 +408,7 @@ extern void NoteLedState(
1088N/A int /*led*/,
1088N/A Bool /*on*/);
1088N/A
1088N/A-extern void MaybeStopHint(
1088N/A+extern _X_EXPORT void MaybeStopHint(
1088N/A DeviceIntPtr /*device*/,
1088N/A ClientPtr /*client*/);
1088N/A
1124N/Adiff --git a/include/window.h b/include/window.h
1124N/Aindex 6fb2f8c..29e4364 100644
1124N/A--- a/include/window.h
1124N/A+++ b/include/window.h
1124N/A@@ -266,4 +266,9 @@ extern _X_EXPORT void DisableMapUnmapEvents(
851N/A extern _X_EXPORT void EnableMapUnmapEvents(
633N/A WindowPtr /* pWin */ );
633N/A
633N/A+#ifdef TSOL
633N/A+# include "validate.h" /* needed for VTKind enum definition */
851N/A+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind);
633N/A+#endif
633N/A+
633N/A #endif /* WINDOW_H */
1124N/Adiff --git a/mi/miinitext.c b/mi/miinitext.c
1124N/Aindex ee04b05..82a4d2e 100644
1124N/A--- a/mi/miinitext.c
1124N/A+++ b/mi/miinitext.c
1088N/A@@ -66,6 +66,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
1088N/A@@ -157,6 +158,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
1088N/A@@ -192,6 +196,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
1124N/A@@ -315,6 +322,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
705N/A { "X-Resource", &noResExtension },
235N/A #endif
1124N/A@@ -484,6 +494,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) {
235N/A+ TsolExtensionInit();
235N/A+ }
235N/A+#endif
235N/A }
235N/A
705N/A #else /* XFree86LOADER */
1124N/Adiff --git a/os/connection.c b/os/connection.c
1124N/Aindex 5580fab..c69d4fe 100644
1124N/A--- a/os/connection.c
1124N/A+++ b/os/connection.c
1124N/A@@ -44,6 +44,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 *
1124N/A@@ -255,6 +282,11 @@ static int ListenTransCount;
98N/A
98N/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
98N/A lookup_trans_conn (int fd)
98N/A {
1124N/A@@ -646,6 +678,12 @@ ClientAuthorized(ClientPtr client,
705N/A priv = (OsCommPtr)client->osPrivate;
705N/A trans_conn = priv->trans_conn;
98N/A
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
98N/A+ auth_id = (*pSecHook->CheckAuthorization) (proto_n, auth_proto,
98N/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 */
705N/A if(trans_conn->flags & TRANS_NOXAUTH) {