dtlogin-userinfo.patch revision 919
781N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
781N/A# Use is subject to license terms.
98N/A#
98N/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#
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# Software.
919N/A#
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.
194N/Adiff -urp -x '*~' -x '*.orig' configure.ac configure.ac
851N/A--- configure.ac 2009-11-03 22:28:52.912813822 -0800
851N/A+++ configure.ac 2009-11-03 22:28:54.304262174 -0800
851N/A@@ -1328,6 +1328,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUI
606N/A XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
606N/A XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
606N/A XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}"
606N/A+XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lproject"
606N/A AC_SUBST([XSERVER_LIBS])
606N/A AC_SUBST([XSERVER_SYS_LIBS])
98N/A
781N/Adiff -urp -x '*~' -x '*.orig' dix/main.c dix/main.c
851N/A--- dix/main.c 2009-10-19 19:45:37.000000000 -0700
851N/A+++ dix/main.c 2009-11-03 22:28:54.304577823 -0800
781N/A@@ -116,6 +116,11 @@ Equipment Corporation.
781N/A #include "dpmsproc.h"
781N/A #endif
781N/A
781N/A+#ifdef SUNSOFT
781N/A+extern void DtloginInit(void);
781N/A+extern void DtloginCloseDown(void);
781N/A+#endif /* SUNSOFT */
781N/A+
781N/A extern void Dispatch(void);
781N/A
851N/A extern void InitProcVectors(void);
851N/A@@ -169,6 +174,13 @@ int main(int argc, char *argv[], char *e
781N/A /* Perform any operating system dependent initializations you'd like */
781N/A OsInit();
781N/A config_init();
781N/A+
781N/A+#ifdef SUNSOFT
781N/A+ /* Create pipe for dtlogin authentication info before we tell dtlogin
781N/A+ we're done and ready for it to run. */
781N/A+ DtloginInit ();
781N/A+#endif
781N/A+
781N/A if(serverGeneration == 1)
781N/A {
781N/A CreateWellKnownSockets();
851N/A@@ -284,6 +296,11 @@ int main(int argc, char *argv[], char *e
781N/A
781N/A Dispatch();
781N/A
781N/A+#ifdef SUNSOFT
781N/A+ /* Return to root privs before calling the rest of close down */
781N/A+ DtloginCloseDown ();
781N/A+#endif
781N/A+
781N/A UndisplayDevices();
781N/A
781N/A /* Now free up whatever must be freed */
194N/Adiff -urp -x '*~' -x '*.orig' os/Makefile.am os/Makefile.am
851N/A--- os/Makefile.am 2009-10-21 14:52:56.000000000 -0700
851N/A+++ os/Makefile.am 2009-11-03 22:28:54.304721381 -0800
705N/A@@ -24,6 +24,7 @@ libos_la_SOURCES = \
98N/A xdmauth.c \
98N/A xstrans.c \
98N/A xprintf.c \
98N/A+ dtlogin.c \
191N/A $(XORG_SRCS)
98N/A
606N/A if SECURE_RPC
705N/A@@ -38,6 +39,8 @@ if NEED_STRLCAT
194N/A libos_la_SOURCES += $(STRLCAT_SRCS)
98N/A endif
98N/A
98N/A+libos_la_LIBADD = -lproject
98N/A+
606N/A EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
606N/A $(XDMCP_SRCS) $(STRLCAT_SRCS)
606N/A
194N/Adiff -urp -x '*~' -x '*.orig' os/auth.c os/auth.c
851N/A--- os/auth.c 2009-07-09 21:05:36.000000000 -0700
851N/A+++ os/auth.c 2009-11-03 22:28:54.304879545 -0800
606N/A@@ -289,6 +289,19 @@ AddAuthorization (unsigned name_length,
98N/A return 0;
98N/A }
98N/A
98N/A+#ifdef SUNSOFT
98N/A+/* This function is called from dtlogin.c
98N/A+ * This is added to do "chmod authorization_file" since
98N/A+ * this file is owned by root and we need to change this
98N/A+ * to user logged on.
98N/A+ */
98N/A+const char *
98N/A+GetAuthFilename(void)
98N/A+{
98N/A+ return (authorization_file);
98N/A+}
98N/A+#endif
98N/A+
98N/A #ifdef XCSECURITY
98N/A
98N/A XID