1088N/A# Copyright (c) 2006, 2011, Oracle
and/or its affiliates. All rights reserved.
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# 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# 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.
705N/A@@ -17,6 +17,10 @@ if RECORD
705N/A@@ -37,6 +41,7 @@ SUBDIRS = \
1124N/Aindex 8673880..14bb5cd 100644
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+/* API needed for Xtsol module to
get/set client trustLevel */
705N/A+getClientTrustLevel(ClientPtr client)
705N/A+ SecurityStateRec *state;
705N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
705N/A+ return state->trustLevel;
705N/A+setClientTrustLevel(ClientPtr client, unsigned int newLevel)
705N/A+ SecurityStateRec *state;
705N/A+ unsigned int oldLevel;
705N/A+ state = dixLookupPrivate(&client->devPrivates, stateKey);
705N/A+ oldLevel = state->trustLevel;
705N/A+ state->trustLevel = newLevel;
1124N/Aindex 3d3894a..8b7317f 100644
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+/* 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 #endif /* _SECURITY_SRV_H */
1179N/Aindex c6cbb69..32a3cce 100644
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]))
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_SYS_LIBS='-ltsol -ltsnet -lsecdb -lbsm'
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"
606N/A AC_SUBST([XVFB_SYS_LIBS])
1179N/A@@ -1528,6 +1538,8 @@ if test "x$XNEST" = xyes; then
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"
606N/A AC_SUBST([XNEST_SYS_LIBS])
1179N/A@@ -2092,6 +2104,7 @@ if test "$KDRIVE" = yes; then
606N/A KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
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"
98N/A # Add Sun IA extension
98N/A+# Add Sun Trusted Extensions extension
1124N/Aindex 7b2132d..63a2378 100644
98N/A@@ -74,8 +74,8 @@ Equipment Corporation.
98N/A ******************************************************************/
98N/A-/* XSERVER_DTRACE additions:
1124N/A- * Copyright (c) 2005-2006, Oracle
and/or its affiliates. All rights reserved.
943N/A+ * Copyright (c) 2005, 2006, Oracle
and/or its affiliates. All rights reserved.
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;
606N/A static void KillAllClients(void);
98N/A+SecurityHookPtr pSecHook = NULL;
98N/A static int nextFreeClientID; /* always MIN free client ID */
98N/A static int nClients; /* number of authorized clients */
1124N/A@@ -896,7 +900,12 @@ ProcCirculateWindow(ClientPtr client)
606N/A GetGeometry(ClientPtr client, xGetGeometryReply *rep)
1124N/A@@ -1990,7 +1999,12 @@ ProcPutImage(ClientPtr client)
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)
1188N/A@@ -2544,6 +2544,9 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
1188N/A * @returns the window at the given coordinates.
1188N/A XYToWindow(SpritePtr pSprite, int x, int y)
1179N/Aindex 41306b3..6d4db39 100644
851N/A@@ -97,6 +97,33 @@ Equipment Corporation.
98N/A ******************************************************************/
943N/A+/* Copyright (c) 2006, Oracle
and/or its affiliates. All rights reserved.
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+ * 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+ * 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 #ifdef HAVE_DIX_CONFIG_H
1124N/A@@ -175,6 +202,11 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind);
705N/A #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
98N/A+extern SecurityHookPtr pSecHook;
1179N/A@@ -1837,7 +1869,12 @@ IsSiblingAboveMe(
1179N/A@@ -1867,7 +1904,12 @@ MakeBoundingRegion (
1179N/A@@ -2067,7 +2109,12 @@ WhereDoIGoInTheStack(
98N/A ReflectStackChange(
1179N/Aindex e1d24e4..9827e4f 100644
1124N/A@@ -126,6 +126,7 @@ static ModuleDefault ModuleDefaults[] = {
606N/A {.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
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}
1124N/Aindex ea065fa..5e5725e 100644
1124N/A@@ -74,3 +74,11 @@ libia_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/IA
606N/A libia_la_LDFLAGS = -avoid-version
98N/A+if BUILD_TSOL_MODULE
98N/A+# Sun Trusted Extensions extension module additions
98N/A+libxtsol_la_LDFLAGS = -avoid-version
1124N/Aindex 12e4b59..50c20ed 100644
1124N/A@@ -172,6 +172,15 @@ extern _X_EXPORT void MarkClientException(
851N/A extern _X_HIDDEN Bool CreateConnectionBlock(void);
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);
851N/A+extern _X_EXPORT int GetGeometry(ClientPtr client, xGetGeometryReply *rep);
1088N/A extern _X_EXPORT int CompareISOLatin1Lowered(
1124N/Aindex bb66dfb..3a51180 100644
98N/A@@ -45,6 +45,34 @@ SOFTWARE.
98N/A ******************************************************************/
943N/A+/* Copyright (c) 2006, 2007, Oracle
and/or its affiliates. All rights reserved.
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+ * 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+ * 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 #ifndef EXTENSIONSTRUCT_H
98N/A #define EXTENSIONSTRUCT_H
606N/A@@ -55,6 +83,10 @@ SOFTWARE.
98N/A typedef struct _ExtensionEntry {
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);
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;
851N/A+extern _X_EXPORT SecurityHookPtr pSecHook;
98N/A #endif /* EXTENSIONSTRUCT_H */
1179N/Aindex 95aae43..3f8a884 100644
1179N/A@@ -408,7 +408,7 @@ extern void NoteLedState(
1088N/A+extern _X_EXPORT void MaybeStopHint(
1124N/Aindex 6fb2f8c..29e4364 100644
1124N/A@@ -266,4 +266,9 @@ extern _X_EXPORT void DisableMapUnmapEvents(
851N/A extern _X_EXPORT void EnableMapUnmapEvents(
633N/A WindowPtr /* pWin */ );
851N/A+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind);
1124N/Aindex ee04b05..82a4d2e 100644
1088N/A@@ -157,6 +158,9 @@ extern Bool noGEExtension;
235N/A #ifdef SolarisIAExtension
1088N/A@@ -192,6 +196,9 @@ typedef void (*InitExtension)(INITARGS);
235N/A /* FIXME: this whole block of externs should be from the appropriate headers */
1124N/A@@ -315,6 +322,9 @@ static ExtensionToggle ExtensionToggleList[] =
705N/A #ifdef SolarisIAExtension
705N/A { IANAME /* "SolarisIA" */, &noIAExtension },
235N/A+ { TSOLNAME /* "SUN_TSOL" */, &noXTSolExtension },
705N/A { "X-Resource", &noResExtension },
1124N/A@@ -484,6 +494,11 @@ InitExtensions(int argc, char *argv[])
235N/A #ifdef SolarisIAExtension
235N/A if (!noIAExtension) IAExtensionInit();
235N/A+ if (!noXTSolExtension) {
705N/A #else /* XFree86LOADER */
1124N/A@@ -44,6 +44,33 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
98N/A ******************************************************************/
943N/A+/* Copyright (c) 2006, Oracle
and/or its affiliates. All rights reserved.
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+ * 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+ * 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 * Stuff to create connections --- OS dependent
1124N/A@@ -255,6 +282,11 @@ static int ListenTransCount;
98N/A static void ErrorConnMax(XtransConnInfo /* trans_conn */);
98N/A+extern SecurityHookPtr pSecHook;
98N/A static XtransConnInfo
98N/A lookup_trans_conn (int fd)
1124N/A@@ -646,6 +678,12 @@ ClientAuthorized(ClientPtr client,
705N/A priv = (OsCommPtr)client->osPrivate;
705N/A trans_conn = priv->trans_conn;
98N/A+ auth_id = (*pSecHook->CheckAuthorization) (proto_n, auth_proto,
98N/A+ string_n, auth_string, client, &reason);
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) {