pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / xorg-server / patches / 07-dtlogin-userinfo.patch
blobb0bc14d1edb8ccb228d68c0e9d00edc32c176bb2
1 # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 # DEALINGS IN THE SOFTWARE.
22 Integration of Display Manager (gdm/xdm/etc.) to X server communication pipe
23 with core server code - see sun-src/os/dtlogin.c for the main implementation.
25 diff --git a/configure.ac b/configure.ac
26 index 77ad53d..28eb2f1 100644
27 --- a/configure.ac
28 +++ b/configure.ac
29 @@ -1492,6 +1492,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
30 XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
31 XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB"
32 XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
33 +XSERVER_SYS_LIBS="${XSERVER_SYS_LIBS} -lproject"
34 AC_SUBST([XSERVER_LIBS])
35 AC_SUBST([XSERVER_SYS_LIBS])
37 diff --git a/dix/main.c b/dix/main.c
38 index e2ec177..0eaa6aa 100644
39 --- a/dix/main.c
40 +++ b/dix/main.c
41 @@ -116,6 +116,11 @@ Equipment Corporation.
42 #include "dpmsproc.h"
43 #endif
45 +#ifdef SUNSOFT
46 +extern void DtloginInit(void);
47 +extern void DtloginCloseDown(void);
48 +#endif /* SUNSOFT */
50 extern void Dispatch(void);
52 #ifdef XQUARTZ
53 @@ -165,6 +170,13 @@ main(int argc, char *argv[], char *envp[])
54 InitBlockAndWakeupHandlers();
55 /* Perform any operating system dependent initializations you'd like */
56 OsInit();
58 +#ifdef SUNSOFT
59 + /* Create pipe for dtlogin authentication info before we tell dtlogin
60 + we're done and ready for it to run. */
61 + DtloginInit ();
62 +#endif
64 if (serverGeneration == 1) {
65 CreateWellKnownSockets();
66 for (i = 1; i < MAXCLIENTS; i++)
67 @@ -302,6 +314,11 @@ main(int argc, char *argv[], char *envp[])
68 pthread_mutex_unlock(&serverRunningMutex);
69 #endif
71 +#ifdef SUNSOFT
72 + /* Return to root privs before calling the rest of close down */
73 + DtloginCloseDown ();
74 +#endif
76 UndisplayDevices();
77 DisableAllDevices();
79 diff --git a/os/Makefile.am b/os/Makefile.am
80 index c4825ad..27d70ca 100644
81 --- a/os/Makefile.am
82 +++ b/os/Makefile.am
83 @@ -35,6 +35,9 @@ if XDMCP
84 libos_la_SOURCES += $(XDMCP_SRCS)
85 endif
87 +libos_la_SOURCES += dtlogin.c
88 +libos_la_LIBADD += -lproject
90 EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
92 if SPECIAL_DTRACE_OBJECTS
93 diff --git a/os/auth.c b/os/auth.c
94 index ac20de4..d43795b 100644
95 --- a/os/auth.c
96 +++ b/os/auth.c
97 @@ -277,6 +277,19 @@ AddAuthorization(unsigned name_length, const char *name,
98 return 0;
101 +#ifdef SUNSOFT
102 +/* This function is called from dtlogin.c
103 + * This is added to do "chmod authorization_file" since
104 + * this file is owned by root and we need to change this
105 + * to user logged on.
106 + */
107 +const char *
108 +GetAuthFilename(void)
110 + return (authorization_file);
112 +#endif
114 #ifdef XCSECURITY