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.
1265N/Aindex b1408f2..54d64ab 100644
705N/A@@ -17,6 +17,10 @@ if RECORD
1265N/A@@ -38,6 +42,7 @@ SUBDIRS = \
1265N/Aindex df5bd58..8825bb6 100644
1265N/A@@ -1138,3 +1138,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 */
1265N/A@@ -221,6 +221,14 @@ dnl Find the math libary, then check for cbrt function in it.
98N/A AC_CHECK_LIB(m, sqrt)
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
1265N/A@@ -1500,6 +1508,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])
1265N/A@@ -1521,6 +1531,8 @@ if test "x$XNEST" = xyes; then
1265N/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 $MAIN_LIB $DIX_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])
1265N/A@@ -2057,6 +2069,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
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"),
1265N/A@@ -163,6 +163,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 */
1265N/A@@ -904,7 +908,12 @@ ProcCirculateWindow(ClientPtr client)
606N/A GetGeometry(ClientPtr client, xGetGeometryReply *rep)
1265N/A@@ -1997,7 +2006,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)
1265N/A@@ -2842,6 +2842,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)
1265N/Aindex 823294b..78cc845 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
1265N/A@@ -183,6 +210,11 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind);
705N/A #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
98N/A+extern SecurityHookPtr pSecHook;
1265N/A static const char *overlay_win_name = "<composite overlay>";
1265N/A@@ -1934,7 +1966,12 @@ IsSiblingAboveMe(
1265N/A@@ -1964,7 +2001,12 @@ MakeBoundingRegion (
1265N/A@@ -2164,7 +2206,12 @@ WhereDoIGoInTheStack(
98N/A ReflectStackChange(
1265N/Aindex 87004df..1455dae 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}
1265N/Aindex 02a6d0d..00f8021 100644
1265N/A@@ -73,3 +73,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
1265N/Aindex f3f68d3..45e4834 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(
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 */
1265N/Aindex fb45617..93039c9 100644
1265N/A@@ -422,7 +422,7 @@ extern void NoteLedState(
1088N/A+extern _X_EXPORT void MaybeStopHint(
1265N/Aindex e13598b..8860dc7 100644
1265N/A@@ -269,4 +269,9 @@ extern _X_EXPORT void EnableMapUnmapEvents(
1265N/A extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
1265N/A extern _X_EXPORT void PrintWindowTree(void);
851N/A+extern _X_EXPORT void ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind);
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)
1265N/A@@ -645,6 +677,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) {