xtsol.patch revision 196
98N/Adiff -urp -x '*~' -x '*.orig' Makefile.am Makefile.am
98N/A--- Makefile.am 2007-01-24 20:08:20.608596000 -0800
98N/A+++ Makefile.am 2007-01-24 20:08:34.851352000 -0800
98N/A@@ -34,6 +34,10 @@ if DBE
98N/A DBE_DIR=dbe
98N/A endif
98N/A
98N/A+if BUILD_TSOL_MODULE
98N/A+TSOL_DIR=tsol
98N/A+endif
98N/A+
98N/A SUBDIRS = \
98N/A doc \
98N/A include \
98N/A@@ -59,6 +63,7 @@ SUBDIRS = \
98N/A $(COMPOSITE_DIR) \
98N/A $(GLX_DIR) \
98N/A IA \
98N/A+ $(TSOL_DIR) \
98N/A exa \
98N/A hw
98N/A
98N/Adiff -urp -x '*~' -x '*.orig' Xext/Makefile.am Xext/Makefile.am
98N/A--- Xext/Makefile.am 2007-01-24 20:08:20.471166000 -0800
98N/A+++ Xext/Makefile.am 2007-01-24 20:08:34.853082000 -0800
98N/A@@ -149,6 +149,10 @@ if DPMSExtension
98N/A MODULE_SRCS += $(DPMS_SRCS)
98N/A endif
98N/A
98N/A+# Solaris Trusted Extensions / XACE compatibility
98N/A+TSOL_SRCS = tsolCompat.c
98N/A+BUILTIN_SRCS += $(TSOL_SRCS)
98N/A+
98N/A # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
98N/A
98N/A libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
98N/Adiff -urp -x '*~' -x '*.orig' Xext/security.c Xext/security.c
98N/A--- Xext/security.c 2007-01-22 21:39:15.000000000 -0800
98N/A+++ Xext/security.c 2007-01-24 20:08:34.879559000 -0800
98N/A@@ -72,10 +72,15 @@ typedef struct {
98N/A ((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
98N/A #define STATEPTR(client) \
98N/A ((client)->devPrivates[securityClientPrivateIndex].ptr)
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+#define TRUSTLEVEL(client) ((client)->trustLevel)
98N/A+#define AUTHID(client) ((client)->authId)
98N/A+#else
98N/A #define TRUSTLEVEL(client) \
98N/A (((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
98N/A #define AUTHID(client) \
98N/A (((SecurityClientStateRec*)STATEPTR(client))->authId)
98N/A+#endif
98N/A
98N/A CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
98N/A
98N/Adiff -urp -x '*~' -x '*.orig' configure.ac configure.ac
194N/A--- configure.ac 2007-07-30 18:33:49.575258000 -0700
194N/A+++ configure.ac 2007-07-30 18:34:04.958972000 -0700
194N/A@@ -127,6 +127,10 @@ AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP
98N/A dnl Find the math libary
98N/A AC_CHECK_LIB(m, sqrt)
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])
98N/A+
98N/A AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
98N/A
98N/A dnl AGPGART headers
194N/A@@ -1868,3 +1872,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
98N/A--- dix/dispatch.c 2007-01-24 20:08:20.363701000 -0800
107N/A+++ dix/dispatch.c 2007-02-15 15:47:10.697015000 -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+/*
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@@ -188,6 +188,11 @@ static void KillAllClients(void);
98N/A
98N/A static void DeleteClientFromAnySelections(ClientPtr client);
98N/A
98N/A+#ifdef TSOL
98N/A+#include <X11/extensions/security.h>
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 */
98N/A@@ -3563,6 +3568,11 @@ CloseDownClient(register ClientPtr clien
98N/A UngrabServer(client);
98N/A }
98N/A BITCLEAR(grabWaiters, client->index);
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
98N/A+ (*pSecHook->DeleteClientFromAnySelections)(client);
98N/A+ else
98N/A+#endif
98N/A DeleteClientFromAnySelections(client);
98N/A ReleaseActiveGrabs(client);
98N/A DeleteClientFontStuff(client);
98N/A@@ -3716,6 +3726,11 @@ void InitClient(ClientPtr client, int i,
98N/A }
98N/A #endif
98N/A client->replyBytesRemaining = 0;
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ client->trustLevel = XSecurityClientTrusted;
98N/A+ client->CheckAccess = NULL;
98N/A+ client->authId = 0;
98N/A+#endif
98N/A #ifdef XAPPGROUP
98N/A client->appgroup = NULL;
98N/A #endif
107N/A@@ -3761,6 +3776,8 @@ InitClientPrivates(ClientPtr client)
107N/A ppriv->ptr = (pointer)NULL;
107N/A }
107N/A
107N/A+#ifndef TSOL
107N/A+/* Temporarily removed to preserve compatibility with old Xtsol module */
107N/A /* Allow registrants to initialize the serverClient devPrivates */
107N/A if (!client->index && ClientStateCallback)
107N/A {
107N/A@@ -3771,6 +3788,7 @@ InitClientPrivates(ClientPtr client)
107N/A clientinfo.setup = (xConnSetup *) NULL;
107N/A CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
107N/A }
107N/A+#endif /* TSOL */
107N/A return 1;
107N/A }
107N/A
98N/Adiff -urp -x '*~' -x '*.orig' dix/events.c dix/events.c
98N/A--- dix/events.c 2007-01-24 20:08:20.365698000 -0800
98N/A+++ dix/events.c 2007-01-24 20:08:34.871662000 -0800
98N/A@@ -76,7 +76,7 @@ Equipment Corporation.
98N/A
98N/A /*****************************************************************
98N/A
98N/A-Copyright 2003-2005 Sun Microsystems, Inc.
98N/A+Copyright 2007 Sun Microsystems, Inc.
98N/A
98N/A All rights reserved.
98N/A
98N/A@@ -266,7 +266,12 @@ static void DoEnterLeaveEvents(
98N/A int mode
98N/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(
98N/A int x,
98N/A int y
98N/A );
98N/A@@ -1947,7 +1952,12 @@ PointInBorderSize(WindowPtr pWin, int x,
98N/A return FALSE;
98N/A }
98N/A
98N/A-static WindowPtr
98N/A+#ifdef TSOL
98N/A+_X_EXPORT
98N/A+#else
98N/A+static
98N/A+#endif
98N/A+WindowPtr
98N/A XYToWindow(int x, int y)
98N/A {
98N/A register WindowPtr pWin;
98N/Adiff -urp -x '*~' -x '*.orig' dix/property.c dix/property.c
98N/A--- dix/property.c 2007-01-22 21:39:15.000000000 -0800
98N/A+++ dix/property.c 2007-01-24 20:08:34.872393000 -0800
98N/A@@ -45,6 +45,34 @@ SOFTWARE.
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>
98N/A #endif
98N/A@@ -62,6 +90,11 @@ SOFTWARE.
98N/A #include "xace.h"
98N/A #endif
98N/A
98N/A+#ifdef TSOL
98N/A+#include "extnsionst.h"
98N/A+extern SecurityHookPtr pSecHook;
98N/A+#endif /* TSOL */
98N/A+
98N/A /*****************************************************************
98N/A * Property Stuff
98N/A *
98N/A@@ -245,6 +278,12 @@ ProcChangeProperty(ClientPtr client)
98N/A }
98N/A #endif
98N/A
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
98N/A+ err = (*pSecHook->ChangeWindowProperty)(client, pWin, stuff->property,
98N/A+ stuff->type, (int)format, (int)mode, len, (pointer)&stuff[1], TRUE);
98N/A+ else
98N/A+#endif /* TSOL */
98N/A err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format,
98N/A (int)mode, len, (pointer)&stuff[1], TRUE);
98N/A if (err != Success)
98N/A@@ -298,6 +337,9 @@ ChangeWindowProperty(WindowPtr pWin, Ato
98N/A pProp->size = len;
98N/A pProp->next = pWin->optional->userProps;
98N/A pWin->optional->userProps = pProp;
98N/A+#ifdef TSOL
98N/A+ pProp->secPrivate = (pointer)NULL;
98N/A+#endif /* TSOL */
98N/A }
98N/A else
98N/A {
98N/A@@ -400,6 +442,9 @@ DeleteProperty(WindowPtr pWin, Atom prop
98N/A event.u.property.time = currentTime.milliseconds;
98N/A DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
98N/A xfree(pProp->data);
98N/A+#ifdef TSOL
98N/A+ xfree(pProp->secPrivate);
98N/A+#endif /* TSOL */
98N/A xfree(pProp);
98N/A }
98N/A return(Success);
98N/A@@ -422,6 +467,9 @@ DeleteAllWindowProperties(WindowPtr pWin
98N/A DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
98N/A pNextProp = pProp->next;
98N/A xfree(pProp->data);
98N/A+#ifdef TSOL
98N/A+ xfree(pProp->secPrivate);
98N/A+#endif /* TSOL */
98N/A xfree(pProp);
98N/A pProp = pNextProp;
98N/A }
98N/A@@ -675,6 +723,11 @@ ProcDeleteProperty(register ClientPtr cl
98N/A }
98N/A #endif
98N/A
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
98N/A+ result = (*pSecHook->DeleteProperty)(client, pWin, stuff->property);
98N/A+ else
98N/A+#endif /* TSOL */
98N/A result = DeleteProperty(pWin, stuff->property);
98N/A if (client->noClientException != Success)
98N/A return(client->noClientException);
98N/Adiff -urp -x '*~' -x '*.orig' dix/window.c dix/window.c
98N/A--- dix/window.c 2007-01-22 21:39:15.000000000 -0800
98N/A+++ dix/window.c 2007-01-24 20:08:34.874164000 -0800
98N/A@@ -98,6 +98,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>
98N/A@@ -181,6 +208,11 @@ static Bool TileScreenSaver(int i, int k
98N/A _X_EXPORT int numSaveUndersViewable = 0;
98N/A _X_EXPORT int deltaSaveUndersViewable = 0;
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
98N/A@@ -846,6 +878,11 @@ FreeWindowResources(register WindowPtr p
98N/A register ScreenPtr pScreen = pWin->drawable.pScreen;
98N/A
98N/A DeleteWindowFromAnySaveSet(pWin);
98N/A+#ifdef TSOL
98N/A+ if (pSecHook)
98N/A+ (*pSecHook->DeleteWindowFromAnySelections)(pWin);
98N/A+ else
98N/A+#endif
98N/A DeleteWindowFromAnySelections(pWin);
98N/A DeleteWindowFromAnyEvents(pWin, TRUE);
98N/A REGION_UNINIT(pScreen, &pWin->clipList);
98N/A@@ -1929,7 +1966,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(
98N/A register WindowPtr pWin,
98N/A register BoxPtr pBox)
98N/A@@ -1965,7 +2007,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,
98N/A@@ -2174,7 +2221,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(
98N/A register WindowPtr pWin,
98N/A register WindowPtr pSib,
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86AutoConfig.c hw/xfree86/common/xf86AutoConfig.c
98N/A--- hw/xfree86/common/xf86AutoConfig.c 2007-01-24 20:08:20.616860000 -0800
98N/A+++ hw/xfree86/common/xf86AutoConfig.c 2007-01-24 20:08:34.874529000 -0800
98N/A@@ -52,6 +52,7 @@
98N/A "\tLoad\t\"record\"\n" \
98N/A "\tLoad\t\"dri\"\n" \
98N/A "\tLoad\t\"IA\"\n" \
98N/A+ "\tLoad\t\"xtsol\"\n" \
98N/A "EndSection\n\n"
98N/A
98N/A #define BUILTIN_DEVICE_NAME \
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/common/xf86Config.c hw/xfree86/common/xf86Config.c
98N/A--- hw/xfree86/common/xf86Config.c 2007-01-24 20:08:20.618280000 -0800
98N/A+++ hw/xfree86/common/xf86Config.c 2007-01-24 20:08:34.875808000 -0800
98N/A@@ -298,6 +298,10 @@ xf86ModulelistFromConfig(pointer **optli
98N/A /* Sun addition - IA extension */
98N/A ptr = xf86addNewLoadDirective(ptr, "IA", XF86_LOAD_MODULE, NULL);
98N/A count++;
98N/A+
98N/A+ /* Sun addition - extension for Solaris Trusted Extensions */
98N/A+ ptr = xf86addNewLoadDirective(ptr, "xtsol", XF86_LOAD_MODULE, NULL);
98N/A+ count++;
98N/A }
98N/A
98N/A /*
98N/Adiff -urp -x '*~' -x '*.orig' hw/xfree86/dixmods/Makefile.am hw/xfree86/dixmods/Makefile.am
98N/A--- hw/xfree86/dixmods/Makefile.am 2007-01-24 20:08:20.618782000 -0800
98N/A+++ hw/xfree86/dixmods/Makefile.am 2007-01-24 20:08:34.876106000 -0800
98N/A@@ -109,3 +109,11 @@ extsmodule_LTLIBRARIES += libIA.la
98N/A libIA_la_LDFLAGS = -avoid-version
98N/A libIA_la_LIBADD = $(top_builddir)/IA/libIA.la
98N/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
98N/Adiff -urp -x '*~' -x '*.orig' include/dixstruct.h include/dixstruct.h
98N/A--- include/dixstruct.h 2007-01-22 21:39:17.000000000 -0800
98N/A+++ include/dixstruct.h 2007-01-24 20:08:34.876423000 -0800
98N/A@@ -127,7 +127,20 @@ typedef struct _Client {
98N/A unsigned char requestLog[MAX_REQUEST_LOG];
98N/A int requestLogIndex;
98N/A #endif
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ int (*pad1)(ClientPtr /*client*/);
98N/A+#endif
98N/A unsigned long replyBytesRemaining;
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ XID authId;
98N/A+ unsigned int trustLevel;
98N/A+ pointer (* CheckAccess)(
98N/A+ ClientPtr /*pClient*/,
98N/A+ XID /*id*/,
98N/A+ RESTYPE /*classes*/,
98N/A+ Mask /*access_mode*/,
98N/A+ pointer /*resourceval*/);
98N/A+#endif
98N/A #ifdef XAPPGROUP
98N/A struct _AppGroupRec* appgroup;
98N/A #endif
98N/Adiff -urp -x '*~' -x '*.orig' include/extnsionst.h include/extnsionst.h
98N/A--- include/extnsionst.h 2007-01-22 21:39:17.000000000 -0800
98N/A+++ include/extnsionst.h 2007-01-24 20:08:34.876825000 -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
98N/A@@ -54,6 +82,10 @@ SOFTWARE.
98N/A #include "extension.h"
98N/A #include "gc.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 */
98N/A@@ -69,6 +101,9 @@ typedef struct _ExtensionEntry {
98N/A pointer extPrivate;
98N/A unsigned short (* MinorOpcode)( /* called for errors */
98N/A ClientPtr /* client */);
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ Bool secure; /* extension visible to untrusted clients? */
98N/A+#endif
98N/A DevUnion *devPrivates;
98N/A } ExtensionEntry;
98N/A
98N/A@@ -146,5 +181,28 @@ extern void DeclareExtensionSecurity(
98N/A char * /*extname*/,
98N/A Bool /*secure*/);
98N/A
98N/A+#ifdef TSOL
98N/A+typedef struct
98N/A+{
98N/A+ XID (*CheckAuthorization)(unsigned int, char *, unsigned int,
98N/A+ char *, ClientPtr , char **);
98N/A+ int (*InitWindow)(ClientPtr, WindowPtr);
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+ char (*CheckPropertyAccess)(ClientPtr, WindowPtr, ATOM, Mask);
98N/A+ void (*ProcessKeyboard)(xEvent *, KeyClassPtr);
98N/A+ void (*DeleteClientFromAnySelections)(ClientPtr);
98N/A+ void (*DeleteWindowFromAnySelections)(WindowPtr);
98N/A+ void (*AuditStart)(ClientPtr);
98N/A+ void (*AuditEnd)(ClientPtr, int);
98N/A+} SecurityHook, *SecurityHookPtr;
98N/A+
98N/A+extern SecurityHookPtr pSecHook;
98N/A+
98N/A+extern void tsolCompatRegisterHooks(void);
98N/A+
98N/A+#endif /* TSOL */
98N/A+
98N/A #endif /* EXTENSIONSTRUCT_H */
98N/A
98N/Adiff -urp -x '*~' -x '*.orig' include/propertyst.h include/propertyst.h
98N/A--- include/propertyst.h 2007-01-22 21:39:17.000000000 -0800
98N/A+++ include/propertyst.h 2007-01-24 20:08:34.877120000 -0800
98N/A@@ -45,6 +45,35 @@ 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+
98N/A #ifndef PROPERTYSTRUCT_H
98N/A #define PROPERTYSTRUCT_H
98N/A #include "misc.h"
98N/A@@ -60,6 +89,13 @@ typedef struct _Property {
98N/A short format; /* format of data for swapping - 8,16,32 */
98N/A long size; /* size of data in (format/8) bytes */
98N/A pointer data; /* private to client */
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ short pad1; /* previously used by LBX */
98N/A+ XID pad2;
98N/A+#endif
98N/A+#ifdef TSOL
98N/A+ pointer secPrivate; /* Security information */
98N/A+#endif /* TSOL */
98N/A } PropertyRec;
98N/A
98N/A #endif /* PROPERTYSTRUCT_H */
98N/Adiff -urp -x '*~' -x '*.orig' include/selection.h include/selection.h
98N/A--- include/selection.h 2007-01-22 21:39:17.000000000 -0800
98N/A+++ include/selection.h 2007-01-24 20:08:34.877423000 -0800
98N/A@@ -49,6 +49,34 @@ SOFTWARE.
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 #include "dixstruct.h"
98N/A /*
98N/A *
98N/A@@ -61,6 +89,9 @@ typedef struct _Selection {
98N/A Window window;
98N/A WindowPtr pWin;
98N/A ClientPtr client;
98N/A+#ifdef TSOL
98N/A+ pointer secPrivate; /* Security Information */
98N/A+#endif /* TSOL */
98N/A } Selection;
98N/A
98N/A #endif /* SELECTION_H */
98N/Adiff -urp -x '*~' -x '*.orig' mi/miinitext.c mi/miinitext.c
98N/A--- mi/miinitext.c 2007-01-22 21:39:17.000000000 -0800
98N/A+++ mi/miinitext.c 2007-01-24 20:08:34.877931000 -0800
98N/A@@ -84,6 +84,10 @@ SOFTWARE.
98N/A #include "micmap.h"
98N/A #include "globals.h"
98N/A
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+#include "extnsionst.h"
98N/A+#endif
98N/A+
98N/A #if defined(QNX4) /* sleaze for Watcom on QNX4 ... */
98N/A #undef GLXEXT
98N/A #endif
98N/A@@ -774,6 +778,11 @@ InitExtensions(argc, argv)
98N/A (ext->initFunc)();
98N/A }
98N/A }
98N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
98N/A+ if (pSecHook) { /* If TSOL security hooks set, add to XACE callbacks */
98N/A+ tsolCompatRegisterHooks();
98N/A+ }
98N/A+#endif
98N/A }
98N/A
98N/A static void (*__miHookInitVisualsFunction)(miInitVisualsProcPtr *);
98N/Adiff -urp -x '*~' -x '*.orig' os/connection.c os/connection.c
98N/A--- os/connection.c 2007-01-24 20:08:20.601169000 -0800
98N/A+++ os/connection.c 2007-01-24 20:08:34.878666000 -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 *
98N/A@@ -309,6 +336,11 @@ 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 {
98N/A@@ -711,6 +743,12 @@ ClientAuthorized(ClientPtr client,
98N/A priv = (OsCommPtr)client->osPrivate;
98N/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 */
98N/A auth_id = CheckAuthorization (proto_n, auth_proto,
98N/A string_n, auth_string, client, &reason);
98N/A