dtlogin-userinfo.patch revision 851
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Use is subject to license terms.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Permission is hereby granted, free of charge, to any person obtaining a
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# copy of this software and associated documentation files (the
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# "Software"), to deal in the Software without restriction, including
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# without limitation the rights to use, copy, modify, merge, publish,
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# distribute, and/or sell copies of the Software, and to permit persons
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# to whom the Software is furnished to do so, provided that the above
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# copyright notice(s) and this permission notice appear in all copies of
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# the Software and that both the above copyright notice(s) and this
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# permission notice appear in supporting documentation.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith#
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# Except as contained in this notice, the name of a copyright holder
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# shall not be used in advertising or otherwise to promote the sale, use
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# or other dealings in this Software without prior written authorization
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith# of the copyright holder.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithdiff -urp -x '*~' -x '*.orig' configure.ac configure.ac
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith--- configure.ac 2009-11-03 22:28:52.912813822 -0800
5c45bb188ab729e501e48732842cb9de6a9813beAlex Valavanis+++ configure.ac 2009-11-03 22:28:54.304262174 -0800
eb4caa8f4cdc2955b58dcd2de06fe770533414c8Jon A. Cruz@@ -1328,6 +1328,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUI
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
a4142717644b885998f4de2b27be4e8648315decMarkus Engel XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lproject"
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White AC_SUBST([XSERVER_LIBS])
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White AC_SUBST([XSERVER_SYS_LIBS])
9836787d16b657453784c30809d330f50d9bc6d8Liam P. White
a4142717644b885998f4de2b27be4e8648315decMarkus Engeldiff -urp -x '*~' -x '*.orig' dix/main.c dix/main.c
a4142717644b885998f4de2b27be4e8648315decMarkus Engel--- dix/main.c 2009-10-19 19:45:37.000000000 -0700
a4142717644b885998f4de2b27be4e8648315decMarkus Engel+++ dix/main.c 2009-11-03 22:28:54.304577823 -0800
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith@@ -116,6 +116,11 @@ Equipment Corporation.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith #include "dpmsproc.h"
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith #endif
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#ifdef SUNSOFT
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+extern void DtloginInit(void);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+extern void DtloginCloseDown(void);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#endif /* SUNSOFT */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith extern void Dispatch(void);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith extern void InitProcVectors(void);
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith@@ -169,6 +174,13 @@ int main(int argc, char *argv[], char *e
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith /* Perform any operating system dependent initializations you'd like */
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith OsInit();
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith config_init();
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith+
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith+#ifdef SUNSOFT
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith+ /* Create pipe for dtlogin authentication info before we tell dtlogin
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith+ we're done and ready for it to run. */
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith+ DtloginInit ();
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#endif
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith if(serverGeneration == 1)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith {
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith CreateWellKnownSockets();
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith@@ -284,6 +296,11 @@ int main(int argc, char *argv[], char *e
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith Dispatch();
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#ifdef SUNSOFT
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ /* Return to root privs before calling the rest of close down */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ DtloginCloseDown ();
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#endif
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+
88381aa2b5d06411a23bed41ae19f73d15c92a80John Smith UndisplayDevices();
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith /* Now free up whatever must be freed */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithdiff -urp -x '*~' -x '*.orig' os/Makefile.am os/Makefile.am
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith--- os/Makefile.am 2009-10-21 14:52:56.000000000 -0700
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+++ os/Makefile.am 2009-11-03 22:28:54.304721381 -0800
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith@@ -24,6 +24,7 @@ libos_la_SOURCES = \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith xdmauth.c \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith xstrans.c \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith xprintf.c \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ dtlogin.c \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith $(XORG_SRCS)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith if SECURE_RPC
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith@@ -38,6 +39,8 @@ if NEED_STRLCAT
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith libos_la_SOURCES += $(STRLCAT_SRCS)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith endif
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+libos_la_LIBADD = -lproject
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith $(XDMCP_SRCS) $(STRLCAT_SRCS)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smithdiff -urp -x '*~' -x '*.orig' os/auth.c os/auth.c
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith--- os/auth.c 2009-07-09 21:05:36.000000000 -0700
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+++ os/auth.c 2009-11-03 22:28:54.304879545 -0800
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith@@ -289,6 +289,19 @@ AddAuthorization (unsigned name_length,
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith return 0;
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith }
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#ifdef SUNSOFT
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+/* This function is called from dtlogin.c
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ * This is added to do "chmod authorization_file" since
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ * this file is owned by root and we need to change this
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ * to user logged on.
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ */
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+const char *
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+GetAuthFilename(void)
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+{
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+ return (authorization_file);
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+}
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+#endif
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith+
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith #ifdef XCSECURITY
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith XID
2f5f997e354e7f4a02b6818bdc68fbece5cb237dJohn Smith