xtsol.patch revision 879
879N/A# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
822N/A# Use is subject to license terms.
606N/A#
606N/A# Permission is hereby granted, free of charge, to any person obtaining a
606N/A# copy of this software and associated documentation files (the
606N/A# "Software"), to deal in the Software without restriction, including
606N/A# without limitation the rights to use, copy, modify, merge, publish,
606N/A# distribute, and/or sell copies of the Software, and to permit persons
606N/A# to whom the Software is furnished to do so, provided that the above
606N/A# copyright notice(s) and this permission notice appear in all copies of
606N/A# the Software and that both the above copyright notice(s) and this
606N/A# permission notice appear in supporting documentation.
606N/A#
606N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
606N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
606N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
606N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
606N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
606N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
606N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
606N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
606N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
606N/A#
606N/A# Except as contained in this notice, the name of a copyright holder
606N/A# shall not be used in advertising or otherwise to promote the sale, use
606N/A# or other dealings in this Software without prior written authorization
606N/A# of the copyright holder.
606N/A
705N/Adiff -urp -x '*~' -x '*.orig' Makefile.am Makefile.am
879N/A--- Makefile.am 2010-01-07 18:14:14.864775261 -0800
879N/A+++ Makefile.am 2010-01-07 18:14:16.389557045 -0800
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 \
705N/Adiff -urp -x '*~' -x '*.orig' Xext/security.c Xext/security.c
879N/A--- Xext/security.c 2010-01-07 14:44:56.000000000 -0800
879N/A+++ Xext/security.c 2010-01-07 18:14:16.390294231 -0800
851N/A@@ -1152,3 +1152,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+}
705N/Adiff -urp -x '*~' -x '*.orig' Xext/securitysrv.h Xext/securitysrv.h
851N/A--- Xext/securitysrv.h 2009-10-27 23:56:18.000000000 -0700
879N/A+++ Xext/securitysrv.h 2010-01-07 18:14:16.390609284 -0800
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 */
98N/Adiff -urp -x '*~' -x '*.orig' configure.ac configure.ac
879N/A--- configure.ac 2010-01-07 18:14:14.865470331 -0800
879N/A+++ configure.ac 2010-01-07 18:14:16.392132857 -0800
851N/A@@ -225,6 +225,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
879N/A@@ -1387,6 +1395,8 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xy
235N/A if test "x$XVFB" = xyes; then
851N/A XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_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
879N/A@@ -1408,6 +1418,8 @@ if test "x$XNEST" = xyes; then
851N/A fi
851N/A XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB $CONFIG_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
879N/A@@ -1976,6 +1988,7 @@ if test "$KDRIVE" = yes; then
606N/A KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
606N/A
851N/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_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*)
879N/A@@ -2139,3 +2152,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])
98N/Adiff -urp -x '*~' -x '*.orig' dix/dispatch.c dix/dispatch.c
879N/A--- dix/dispatch.c 2010-01-03 19:17:33.000000000 -0800
879N/A+++ dix/dispatch.c 2010-01-07 18:14:16.394483902 -0800
98N/A@@ -74,8 +74,8 @@ Equipment Corporation.
98N/A
98N/A ******************************************************************/
98N/A
98N/A-/* XSERVER_DTRACE additions:
98N/A- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
98N/A+/*
606N/A+ * Copyright 2008 Sun Microsystems, Inc. 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 */
879N/A@@ -931,7 +935,12 @@ ProcCirculateWindow(ClientPtr client)
606N/A return(client->noClientException);
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;
879N/A@@ -2071,7 +2080,12 @@ ProcPutImage(ClientPtr client)
606N/A return (client->noClientException);
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)
98N/Adiff -urp -x '*~' -x '*.orig' dix/events.c dix/events.c
879N/A--- dix/events.c 2010-01-07 14:44:56.000000000 -0800
879N/A+++ dix/events.c 2010-01-07 18:14:16.397086083 -0800
879N/A@@ -75,7 +75,7 @@ Equipment Corporation.
879N/A ******************************************************************/
98N/A
879N/A /*
879N/A- * Copyright © 2003-2005 Sun Microsystems, Inc. All rights reserved.
879N/A+ * Copyright © 2003-2005, 2007 Sun Microsystems, Inc. All rights reserved.
879N/A *
879N/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@@ -360,7 +360,12 @@ IsMaster(DeviceIntPtr dev)
851N/A return (dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD);
705N/A }
98N/A
98N/A-static WindowPtr XYToWindow(
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
98N/A+WindowPtr XYToWindow(
705N/A DeviceIntPtr pDev,
98N/A int x,
98N/A int y
879N/A@@ -2631,7 +2636,12 @@ PointInBorderSize(WindowPtr pWin, int x,
606N/A *
606N/A * @returns the window at the given coordinates.
606N/A */
705N/A-static WindowPtr
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
705N/A+WindowPtr
705N/A XYToWindow(DeviceIntPtr pDev, int x, int y)
98N/A {
606N/A WindowPtr pWin;
98N/Adiff -urp -x '*~' -x '*.orig' dix/window.c dix/window.c
851N/A--- dix/window.c 2009-10-27 23:56:19.000000000 -0700
879N/A+++ dix/window.c 2010-01-07 18:14:16.398779526 -0800
851N/A@@ -97,6 +97,33 @@ Equipment Corporation.
98N/A
98N/A ******************************************************************/
98N/A
98N/A+/* Copyright 2006 Sun Microsystems, Inc. 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>
851N/A@@ -179,6 +206,11 @@ static Bool TileScreenSaver(int i, int k
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
851N/A@@ -1825,7 +1857,12 @@ IsSiblingAboveMe(
98N/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)
851N/A@@ -1861,7 +1898,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,
851N/A@@ -2065,7 +2107,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,
606N/Adiff -urp -x '*~' -x '*.orig' hw/dmx/Makefile.am hw/dmx/Makefile.am
851N/A--- hw/dmx/Makefile.am 2009-10-27 23:56:20.000000000 -0700
879N/A+++ hw/dmx/Makefile.am 2010-01-07 18:14:16.399094652 -0800
851N/A@@ -84,6 +84,7 @@ XDMX_LIBS = \
851N/A @XDMX_LIBS@ \
851N/A $(GLX_LIBS) \
606N/A input/libdmxinput.a \
851N/A+ $(top_builddir)/tsol/libxtsol.la \
851N/A config/libdmxconfig.a
98N/A
606N/A Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86Config.c hw/xfree86/common/xf86Config.c
879N/A--- hw/xfree86/common/xf86Config.c 2010-01-07 18:14:14.866096681 -0800
879N/A+++ hw/xfree86/common/xf86Config.c 2010-01-07 18:14:16.400356732 -0800
879N/A@@ -117,6 +117,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
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/dixmods/Makefile.am hw/xfree86/dixmods/Makefile.am
879N/A--- hw/xfree86/dixmods/Makefile.am 2010-01-07 18:14:14.866255080 -0800
879N/A+++ hw/xfree86/dixmods/Makefile.am 2010-01-07 18:14:16.400667347 -0800
705N/A@@ -73,3 +73,11 @@ extsmodule_LTLIBRARIES += libia.la
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
633N/Adiff -urp -x '*~' -x '*.orig' include/dix.h include/dix.h
879N/A--- include/dix.h 2010-01-07 14:44:57.000000000 -0800
879N/A+++ include/dix.h 2010-01-07 18:14:16.401101717 -0800
851N/A@@ -171,6 +171,15 @@ extern _X_EXPORT void MarkClientExceptio
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
851N/A extern _X_EXPORT void CopyISOLatin1Lowered(
633N/Adiff -urp -x '*~' -x '*.orig' include/dixevents.h include/dixevents.h
851N/A--- include/dixevents.h 2009-08-10 21:00:25.000000000 -0700
879N/A+++ include/dixevents.h 2010-01-07 18:14:16.401388928 -0800
851N/A@@ -88,4 +88,8 @@ extern _X_EXPORT void PostSyntheticMotio
705N/A unsigned long time);
633N/A #endif
633N/A
633N/A+#ifdef TSOL
851N/A+extern _X_EXPORT WindowPtr XYToWindow(DeviceIntPtr pDev, int x, int y);
633N/A+#endif
633N/A+
633N/A #endif /* DIXEVENTS_H */
98N/Adiff -urp -x '*~' -x '*.orig' include/extnsionst.h include/extnsionst.h
851N/A--- include/extnsionst.h 2009-08-10 21:00:25.000000000 -0700
879N/A+++ include/extnsionst.h 2010-01-07 18:14:16.401772630 -0800
98N/A@@ -45,6 +45,34 @@ SOFTWARE.
98N/A
98N/A ******************************************************************/
98N/A
98N/A+/* Copyright 2007 Sun Microsystems, Inc. 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
633N/Adiff -urp -x '*~' -x '*.orig' include/window.h include/window.h
851N/A--- include/window.h 2009-10-27 23:56:24.000000000 -0700
879N/A+++ include/window.h 2010-01-07 18:14:16.402098271 -0800
851N/A@@ -266,4 +266,9 @@ extern _X_EXPORT void DisableMapUnmapEve
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 */
98N/Adiff -urp -x '*~' -x '*.orig' mi/miinitext.c mi/miinitext.c
879N/A--- mi/miinitext.c 2010-01-07 18:14:14.866528563 -0800
879N/A+++ mi/miinitext.c 2010-01-07 18:14:16.402610999 -0800
851N/A@@ -163,6 +163,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
851N/A@@ -197,6 +200,9 @@ typedef void (*InitExtension)(INITARGS);
235N/A #ifdef SolarisIAExtension
235N/A #include <X11/extensions/interactive.h>
235N/A #endif
235N/A+#ifdef TSOL
822N/A+#include "../tsol/tsol.h"
235N/A+#endif
235N/A
235N/A /* FIXME: this whole block of externs should be from the appropriate headers */
705N/A #ifdef MITSHM
851N/A@@ -333,6 +339,9 @@ static ExtensionToggle ExtensionToggleLi
705N/A #ifdef SolarisIAExtension
705N/A { IANAME /* "SolarisIA" */, &noIAExtension },
705N/A #endif
235N/A+#ifdef TSOL
235N/A+ { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
235N/A+#endif
705N/A #ifdef RES
705N/A { "X-Resource", &noResExtension },
235N/A #endif
851N/A@@ -509,6 +518,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 */
98N/Adiff -urp -x '*~' -x '*.orig' os/connection.c os/connection.c
851N/A--- os/connection.c 2009-10-27 23:56:24.000000000 -0700
879N/A+++ os/connection.c 2010-01-07 18:14:16.403367950 -0800
98N/A@@ -44,6 +44,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE
98N/A SOFTWARE.
98N/A
98N/A ******************************************************************/
98N/A+/* Copyright 2006 Sun Microsystems, Inc. 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 *
851N/A@@ -256,6 +283,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 {
851N/A@@ -651,6 +683,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) {