688N/A@@ -34,6 +34,10 @@ if DBE
919N/A@@ -59,6 +63,7 @@ SUBDIRS = \
1265N/A@@ -149,6 +149,10 @@ if DPMSExtension
1265N/A MODULE_SRCS += $(DPMS_SRCS)
943N/A+# Solaris Trusted Extensions / XACE compatibility
688N/A+BUILTIN_SRCS += $(TSOL_SRCS)
688N/A # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
688N/A libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
688N/A@@ -72,10 +72,15 @@ typedef struct {
688N/A ((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
688N/A #define STATEPTR(client) \
688N/A ((client)->devPrivates[securityClientPrivateIndex].ptr)
688N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
688N/A+#define TRUSTLEVEL(client) ((client)->trustLevel)
688N/A+#define AUTHID(client) ((client)->authId)
688N/A #define TRUSTLEVEL(client) \
688N/A (((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
688N/A #define AUTHID(client) \
688N/A (((SecurityClientStateRec*)STATEPTR(client))->authId)
688N/A CallbackListPtr SecurityValidateGroupCallback = NULL; /* see
security.h */
962N/A@@ -127,6 +127,13 @@ AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP
962N/A dnl Find the math libary
962N/A+dnl Check for libtsol for Solaris Trusted Extensions module
688N/A+AC_CHECK_LIB(tsol, bsllow, [BUILD_TSOL_MODULE=yes], [BUILD_TSOL_MODULE=no])
688N/A+AM_CONDITIONAL(BUILD_TSOL_MODULE, [test x$BUILD_TSOL_MODULE = xyes])
688N/A+if test "x$BUILD_TSOL_MODULE" = xyes; then
688N/A AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
688N/A if test "x$XVFB" = xyes; then
688N/A- XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $CWRAP_LIB $OS_LIB $LIBS"
688N/A+ XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $TSOL_LIB $CWRAP_LIB $OS_LIB $LIBS"
688N/A AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
688N/A if test "x$XNEST" = xyes; then
688N/A- XNEST_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $CWRAP_LIB $OS_LIB $LIBS"
688N/A+ XNEST_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $TSOL_LIB $CWRAP_LIB $OS_LIB $LIBS"
688N/A if test "x$XPRINT" = xyes; then
688N/A PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
688N/A- XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
688N/A+ XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $TSOL_LIB"
688N/A XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS"
688N/A AC_SUBST([XPRINT_CFLAGS])
688N/A AC_SUBST([XPRINT_LIBS])
688N/A # dix os fb mi extension glx (NOTYET) damage shadow xpstubs
688N/A #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \
688N/A # $MIEXT_SHADOW_LIB $XPSTUBS_LIB"
688N/A- KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $OS_LIB"
688N/A+ KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $IA_LIB $TSOL_LIB $OS_LIB"
688N/A+# Add Sun Trusted Extensions extension
688N/A@@ -74,8 +74,8 @@ Equipment Corporation.
688N/A ******************************************************************/
688N/A-/* XSERVER_DTRACE additions:
688N/A- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
688N/A+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
688N/A * Permission is hereby granted, free of charge, to any person obtaining a
688N/A * copy of this software and associated documentation files (the
688N/A@@ -188,6 +188,11 @@ static void KillAllClients(void);
688N/A static void DeleteClientFromAnySelections(ClientPtr client);
688N/A+SecurityHookPtr pSecHook = NULL;
688N/A static int nextFreeClientID; /* always MIN free client ID */
688N/A static int nClients; /* number of authorized clients */
688N/A@@ -3563,6 +3568,11 @@ CloseDownClient(register ClientPtr clien
688N/A BITCLEAR(grabWaiters, client->index);
688N/A+ (*pSecHook->DeleteClientFromAnySelections)(client);
688N/A DeleteClientFromAnySelections(client);
688N/A ReleaseActiveGrabs(client);
688N/A DeleteClientFontStuff(client);
688N/A@@ -3716,6 +3726,11 @@ void InitClient(ClientPtr client, int i,
688N/A client->replyBytesRemaining = 0;
688N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
688N/A+ client->trustLevel = XSecurityClientTrusted;
688N/A+ client->CheckAccess = NULL;
688N/A client->appgroup = NULL;
688N/A@@ -3761,6 +3776,8 @@ InitClientPrivates(ClientPtr client)
688N/A ppriv->ptr = (pointer)NULL;
688N/A+/* Temporarily removed to preserve compatibility with old Xtsol module */
688N/A /* Allow registrants to initialize the serverClient devPrivates */
688N/A if (!client->index && ClientStateCallback)
688N/A@@ -3771,6 +3788,7 @@ InitClientPrivates(ClientPtr client)
688N/A CallCallbacks((&ClientStateCallback), (pointer)&clientinfo);
688N/A@@ -76,7 +76,7 @@ Equipment Corporation.
688N/A /*****************************************************************
688N/A-Copyright 2003-2005 Sun Microsystems, Inc.
688N/A+Copyright 2007 Sun Microsystems, Inc.
688N/A@@ -266,7 +266,12 @@ static void DoEnterLeaveEvents(
688N/A-static WindowPtr XYToWindow(
688N/A@@ -1947,7 +1952,12 @@ PointInBorderSize(WindowPtr pWin, int x,
688N/A XYToWindow(int x, int y)
688N/A@@ -45,6 +45,34 @@ SOFTWARE.
688N/A ******************************************************************/
688N/A+/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
688N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
688N/A+ * copy of this software and associated documentation files (the
688N/A+ * "Software"), to deal in the Software without restriction, including
688N/A+ * without limitation the rights to use, copy, modify, merge, publish,
688N/A+ * distribute,
and/or sell copies of the Software, and to permit persons
688N/A+ * to whom the Software is furnished to do so, provided that the above
688N/A+ * copyright notice(s) and this permission notice appear in all copies of
688N/A+ * the Software and that both the above copyright notice(s) and this
688N/A+ * permission notice appear in supporting documentation.
688N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
688N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
688N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
688N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
688N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
688N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
688N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
688N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
688N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
688N/A+ * Except as contained in this notice, the name of a copyright holder
688N/A+ * shall not be used in advertising or otherwise to promote the sale, use
688N/A+ * or other dealings in this Software without prior written authorization
688N/A+ * of the copyright holder.
688N/A #ifdef HAVE_DIX_CONFIG_H
688N/A@@ -62,6 +90,11 @@ SOFTWARE.
688N/A+extern SecurityHookPtr pSecHook;
688N/A /*****************************************************************
688N/A@@ -245,6 +278,12 @@ ProcChangeProperty(ClientPtr client)
688N/A+ err = (*pSecHook->ChangeWindowProperty)(client, pWin, stuff->property,
1265N/A+ stuff->type, (int)format, (int)mode, len, (pointer)&stuff[1], TRUE);
688N/A err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format,
688N/A (int)mode, len, (pointer)&stuff[1], TRUE);
688N/A@@ -298,6 +337,9 @@ ChangeWindowProperty(WindowPtr pWin, Ato
688N/A pProp->next = pWin->optional->userProps;
688N/A pWin->optional->userProps = pProp;
688N/A+ pProp->secPrivate = (pointer)NULL;
688N/A@@ -400,6 +442,9 @@ DeleteProperty(WindowPtr pWin, Atom prop
688N/A DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
688N/A+ xfree(pProp->secPrivate);
688N/A@@ -422,6 +467,9 @@ DeleteAllWindowProperties(WindowPtr pWin
688N/A DeliverEvents(pWin, &event, 1, (WindowPtr)NULL);
688N/A pNextProp = pProp->next;
688N/A+ xfree(pProp->secPrivate);
688N/A@@ -675,6 +723,11 @@ ProcDeleteProperty(register ClientPtr cl
688N/A+ result = (*pSecHook->DeleteProperty)(client, pWin, stuff->property);
688N/A result = DeleteProperty(pWin, stuff->property);
688N/A if (client->noClientException != Success)
688N/A return(client->noClientException);
688N/A@@ -98,6 +98,33 @@ Equipment Corporation.
688N/A ******************************************************************/
688N/A+/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
688N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
688N/A+ * copy of this software and associated documentation files (the
688N/A+ * "Software"), to deal in the Software without restriction, including
688N/A+ * without limitation the rights to use, copy, modify, merge, publish,
688N/A+ * distribute,
and/or sell copies of the Software, and to permit persons
688N/A+ * to whom the Software is furnished to do so, provided that the above
688N/A+ * copyright notice(s) and this permission notice appear in all copies of
688N/A+ * the Software and that both the above copyright notice(s) and this
688N/A+ * permission notice appear in supporting documentation.
688N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
688N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
688N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
688N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
688N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
688N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
688N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
688N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
688N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
688N/A+ * Except as contained in this notice, the name of a copyright holder
688N/A+ * shall not be used in advertising or otherwise to promote the sale, use
688N/A+ * or other dealings in this Software without prior written authorization
688N/A+ * of the copyright holder.
688N/A #ifdef HAVE_DIX_CONFIG_H
688N/A@@ -181,6 +208,11 @@ static Bool TileScreenSaver(int i, int k
688N/A _X_EXPORT int numSaveUndersViewable = 0;
688N/A _X_EXPORT int deltaSaveUndersViewable = 0;
688N/A+extern SecurityHookPtr pSecHook;
688N/A@@ -846,6 +878,11 @@ FreeWindowResources(register WindowPtr p
688N/A DeleteWindowFromAnySaveSet(pWin);
688N/A+ (*pSecHook->DeleteWindowFromAnySelections)(pWin);
688N/A DeleteWindowFromAnySelections(pWin);
688N/A DeleteWindowFromAnyEvents(pWin, TRUE);
688N/A REGION_UNINIT(pScreen, &pWin->clipList);
688N/A@@ -1929,7 +1966,12 @@ IsSiblingAboveMe(
688N/A register WindowPtr pWin,
688N/A@@ -1965,7 +2007,12 @@ MakeBoundingRegion (
688N/A@@ -2174,7 +2221,12 @@ WhereDoIGoInTheStack(
688N/A register WindowPtr pWin,
688N/A register WindowPtr pSib,
688N/A "\tLoad\t\"record\"\n" \
688N/A+ "\tLoad\t\"xtsol\"\n" \
688N/A #define BUILTIN_DEVICE_NAME \
688N/A@@ -298,6 +298,10 @@ xf86ModulelistFromConfig(pointer **optli
688N/A /* Sun addition - IA extension */
688N/A ptr = xf86addNewLoadDirective(ptr, "IA", XF86_LOAD_MODULE, NULL);
688N/A+ /* Sun addition - extension for Solaris Trusted Extensions */
688N/A+ ptr = xf86addNewLoadDirective(ptr, "xtsol", XF86_LOAD_MODULE, NULL);
688N/A libIA_la_LDFLAGS = -avoid-version
688N/A+# Sun Trusted Extensions extension module additions
688N/A+libxtsol_la_LDFLAGS = -avoid-version
688N/A@@ -127,7 +127,20 @@ typedef struct _Client {
688N/A unsigned char requestLog[MAX_REQUEST_LOG];
688N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
688N/A+ int (*pad1)(ClientPtr /*client*/);
688N/A unsigned long replyBytesRemaining;
688N/A+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
688N/A+ unsigned int trustLevel;
688N/A+ pointer (* CheckAccess)(
688N/A+ ClientPtr /*pClient*/,
688N/A+ pointer /*resourceval*/);
688N/A struct _AppGroupRec* appgroup;
688N/A@@ -45,6 +45,34 @@ SOFTWARE.
688N/A ******************************************************************/
688N/A+/* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
688N/A+ * Permission is hereby granted, free of charge, to any person obtaining a
688N/A+ * copy of this software and associated documentation files (the
688N/A+ * "Software"), to deal in the Software without restriction, including
688N/A+ * without limitation the rights to use, copy, modify, merge, publish,
688N/A+ * distribute,
and/or sell copies of the Software, and to permit persons
688N/A+ * to whom the Software is furnished to do so, provided that the above
688N/A+ * copyright notice(s) and this permission notice appear in all copies of
688N/A+ * the Software and that both the above copyright notice(s) and this
688N/A+ * permission notice appear in supporting documentation.
688N/A+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
688N/A+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
688N/A+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
688N/A+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
688N/A+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
688N/A+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
688N/A+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
688N/A+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
688N/A+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
688N/A+ * Except as contained in this notice, the name of a copyright holder
688N/A+ * shall not be used in advertising or otherwise to promote the sale, use
688N/A+ * or other dealings in this Software without prior written authorization
688N/A+ * of the copyright holder.
688N/A #ifndef EXTENSIONSTRUCT_H
688N/A #define EXTENSIONSTRUCT_H
688N/A@@ -54,6 +82,10 @@ SOFTWARE.
688N/A typedef struct _ExtensionEntry {
688N/A void (* CloseDown)( /* called at server shutdown */
@@ -69,6 +101,9 @@ typedef struct _ExtensionEntry {
unsigned short (* MinorOpcode)( /* called for errors */
+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
+ Bool secure; /* extension visible to untrusted clients? */
@@ -146,5 +181,28 @@ extern void DeclareExtensionSecurity(
+ XID (*CheckAuthorization)(unsigned int, char *, unsigned int,
+ char *, ClientPtr , char **);
+ int (*InitWindow)(ClientPtr, WindowPtr);
+ int (*ChangeWindowProperty)(ClientPtr, WindowPtr, Atom, Atom, int, int,
+ unsigned long, pointer, Bool);
+ int (*DeleteProperty)(ClientPtr, WindowPtr, Atom);
+ char (*CheckPropertyAccess)(ClientPtr, WindowPtr, ATOM, Mask);
+ void (*ProcessKeyboard)(xEvent *, KeyClassPtr);
+ void (*DeleteClientFromAnySelections)(ClientPtr);
+ void (*DeleteWindowFromAnySelections)(WindowPtr);
+ void (*AuditStart)(ClientPtr);
+ void (*AuditEnd)(ClientPtr, int);
+} SecurityHook, *SecurityHookPtr;
+extern SecurityHookPtr pSecHook;
+extern void tsolCompatRegisterHooks(void);
#endif /* EXTENSIONSTRUCT_H */
@@ -45,6 +45,35 @@ SOFTWARE.
******************************************************************/
+/* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute,
and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
@@ -60,6 +89,13 @@ typedef struct _Property {
short format; /* format of data for swapping - 8,16,32 */
long size; /* size of data in (format/8) bytes */
pointer data; /* private to client */
+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
+ short pad1; /* previously used by LBX */
+ pointer secPrivate; /* Security information */
#endif /* PROPERTYSTRUCT_H */
@@ -49,6 +49,34 @@ SOFTWARE.
******************************************************************/
+/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute,
and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
@@ -61,6 +89,9 @@ typedef struct _Selection {
+ pointer secPrivate; /* Security Information */
@@ -86,6 +86,10 @@ SOFTWARE.
#define SolarisIAExtension
+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
#if defined(QNX4) /* sleaze for Watcom on QNX4 ... */
@@ -221,6 +225,9 @@ extern Bool noXvExtension;
#ifdef SolarisIAExtension
@@ -266,6 +273,10 @@ typedef void (*InitExtension)(INITARGS);
#ifdef SolarisIAExtension
/* FIXME: this whole block of externs should be from the appropriate headers */
@@ -396,6 +407,9 @@ extern void CompositeExtensionInit(INITA
#ifdef SolarisIAExtension
extern void IAExtensionInit(void);
+extern void TsolExtensionInit(void);
/* The following is only a small first step towards run-time
* configurable extensions.
@@ -456,6 +470,9 @@ static ExtensionToggle ExtensionToggleLi
{ "SECURITY", &noSecurityExtension },
+ { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
{ "SYNC", &noSyncExtension },
@@ -681,6 +698,14 @@ InitExtensions(argc, argv)
#ifdef SolarisIAExtension
if (!noIAExtension) IAExtensionInit();
+ if (!noXTSolExtension) {
+ if (pSecHook) { /* If TSOL security hooks set, add to XACE callbacks */
+ tsolCompatRegisterHooks();
@@ -792,6 +817,11 @@ InitExtensions(argc, argv)
+#ifdef TSOL /* Maintaining binary compatibility with Xtsol module */
+ if (pSecHook) { /* If TSOL security hooks set, add to XACE callbacks */
+ tsolCompatRegisterHooks();
static void (*__miHookInitVisualsFunction)(miInitVisualsProcPtr *);
@@ -44,6 +44,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE
******************************************************************/
+/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute,
and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
/*****************************************************************
* Stuff to create connections --- OS dependent
@@ -309,6 +336,11 @@ int ListenTransCount;
static void ErrorConnMax(XtransConnInfo /* trans_conn */);
+extern SecurityHookPtr pSecHook;
lookup_trans_conn (int fd)
@@ -711,6 +743,12 @@ ClientAuthorized(ClientPtr client,
priv = (OsCommPtr)client->osPrivate;
trans_conn = priv->trans_conn;
+ auth_id = (*pSecHook->CheckAuthorization) (proto_n, auth_proto,
+ string_n, auth_string, client, &reason);
auth_id = CheckAuthorization (proto_n, auth_proto,
string_n, auth_string, client, &reason);