dtlogin-userinfo.patch revision 1142
0N/A# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/A# Permission is hereby granted, free of charge, to any person obtaining a
0N/A# copy of this software and associated documentation files (the "Software"),
1102N/A# to deal in the Software without restriction, including without limitation
0N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0N/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.
919N/Adiff --git a/configure.ac b/configure.ac
919N/Aindex de6665a..ac7caae 100644
919N/A--- a/configure.ac
919N/A+++ b/configure.ac
0N/A@@ -1458,6 +1458,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
0N/A XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
0N/A XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
156N/A XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
493N/A+XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lproject"
0N/A AC_SUBST([XSERVER_LIBS])
970N/A AC_SUBST([XSERVER_SYS_LIBS])
970N/A
970N/Adiff --git a/dix/main.c b/dix/main.c
970N/Aindex e20ffd6..7cab838 100644
970N/A--- a/dix/main.c
970N/A+++ b/dix/main.c
970N/A@@ -115,6 +115,11 @@ Equipment Corporation.
970N/A #include "dpmsproc.h"
970N/A #endif
970N/A
970N/A+#ifdef SUNSOFT
970N/A+extern void DtloginInit(void);
970N/A+extern void DtloginCloseDown(void);
970N/A+#endif /* SUNSOFT */
970N/A+
970N/A extern void Dispatch(void);
970N/A
970N/A #ifdef XQUARTZ
970N/A@@ -165,6 +170,13 @@ int main(int argc, char *argv[], char *envp[])
970N/A InitBlockAndWakeupHandlers();
970N/A /* Perform any operating system dependent initializations you'd like */
970N/A OsInit();
970N/A+
970N/A+#ifdef SUNSOFT
970N/A+ /* Create pipe for dtlogin authentication info before we tell dtlogin
0N/A+ we're done and ready for it to run. */
950N/A+ DtloginInit ();
0N/A+#endif
911N/A+
950N/A if(serverGeneration == 1)
950N/A {
911N/A CreateWellKnownSockets();
0N/A@@ -293,6 +305,11 @@ int main(int argc, char *argv[], char *envp[])
493N/A pthread_mutex_unlock(&serverRunningMutex);
493N/A #endif
0N/A
0N/A+#ifdef SUNSOFT
156N/A+ /* Return to root privs before calling the rest of close down */
156N/A+ DtloginCloseDown ();
0N/A+#endif
0N/A+
950N/A UndisplayDevices();
950N/A
950N/A /* Now free up whatever must be freed */
950N/Adiff --git a/os/Makefile.am b/os/Makefile.am
950N/Aindex 66a4a0f..b4f90ce 100644
950N/A--- a/os/Makefile.am
1102N/A+++ b/os/Makefile.am
1160N/A@@ -40,6 +40,9 @@ if NEED_STRLCAT
1160N/A libos_la_SOURCES += $(STRLCAT_SRCS)
364N/A endif
156N/A
156N/A+libos_la_SOURCES += dtlogin.c
0N/A+libos_la_LIBADD = -lproject
591N/A+
947N/A EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
947N/A $(XDMCP_SRCS) $(STRLCAT_SRCS)
591N/A
591N/Adiff --git a/os/auth.c b/os/auth.c
591N/Aindex 7685751..995235e 100644
947N/A--- a/os/auth.c
947N/A+++ b/os/auth.c
947N/A@@ -290,6 +290,19 @@ AddAuthorization (unsigned name_length, const char *name,
947N/A return 0;
947N/A }
947N/A
947N/A+#ifdef SUNSOFT
947N/A+/* This function is called from dtlogin.c
947N/A+ * This is added to do "chmod authorization_file" since
947N/A+ * this file is owned by root and we need to change this
947N/A+ * to user logged on.
947N/A+ */
947N/A+const char *
947N/A+GetAuthFilename(void)
947N/A+{
947N/A+ return (authorization_file);
0N/A+}
156N/A+#endif
493N/A+
493N/A #ifdef XCSECURITY
156N/A
493N/A XID
493N/A