summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-08-17 15:29:16 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-08-17 15:29:47 -0700
commit23fbd5292d356067e85e1eec4eb4f743532b0503 (patch)
tree3255e7d3429dba3fc13d9e98eeabcedf9fa75ebf
parent6a32a96d8df184c3ace4847beb48fdcb846d2286 (diff)
Actually build Secure RPC authentication support (missed in modularization)
-rw-r--r--configure.ac1
-rw-r--r--include/dix-config.h.in3
-rw-r--r--os/Makefile.am6
-rw-r--r--os/rpcauth.c16
4 files changed, 17 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 41cc10369..f0ede7589 100644
--- a/configure.ac
+++ b/configure.ac
@@ -597,6 +597,7 @@ XTRANS_CONNECTION_FLAGS
597 597
598# Secure RPC detection macro from xtrans.m4 598# Secure RPC detection macro from xtrans.m4
599XTRANS_SECURE_RPC_FLAGS 599XTRANS_SECURE_RPC_FLAGS
600AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes])
600 601
601AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) 602AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
602AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) 603AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index ad97605a5..69fab5e53 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -282,6 +282,9 @@
282/* Support MIT-SCREEN-SAVER extension */ 282/* Support MIT-SCREEN-SAVER extension */
283#undef SCREENSAVER 283#undef SCREENSAVER
284 284
285/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
286#undef SECURE_RPC
287
285/* Use a lock to prevent multiple servers on a display */ 288/* Use a lock to prevent multiple servers on a display */
286#undef SERVER_LOCK 289#undef SERVER_LOCK
287 290
diff --git a/os/Makefile.am b/os/Makefile.am
index 53b2d7f0c..d2a989782 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -3,9 +3,9 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la
3AM_CFLAGS = $(DIX_CFLAGS) 3AM_CFLAGS = $(DIX_CFLAGS)
4 4
5# FIXME: Add support for these in configure.ac 5# FIXME: Add support for these in configure.ac
6SECURERPC_SRCS = rpcauth.c
7INTERNALMALLOC_SRCS = xalloc.c 6INTERNALMALLOC_SRCS = xalloc.c
8 7
8SECURERPC_SRCS = rpcauth.c
9XCSECURITY_SRCS = secauth.c 9XCSECURITY_SRCS = secauth.c
10XDMCP_SRCS = xdmcp.c 10XDMCP_SRCS = xdmcp.c
11STRLCAT_SRCS = strlcat.c strlcpy.c 11STRLCAT_SRCS = strlcat.c strlcpy.c
@@ -28,6 +28,10 @@ libos_la_SOURCES = \
28 xprintf.c \ 28 xprintf.c \
29 $(XORG_SRCS) 29 $(XORG_SRCS)
30 30
31if SECURE_RPC
32libos_la_SOURCES += $(SECURERPC_SRCS)
33endif
34
31if XCSECURITY 35if XCSECURITY
32libos_la_SOURCES += $(XCSECURITY_SRCS) 36libos_la_SOURCES += $(XCSECURITY_SRCS)
33endif 37endif
diff --git a/os/rpcauth.c b/os/rpcauth.c
index 603844aee..3451ac18b 100644
--- a/os/rpcauth.c
+++ b/os/rpcauth.c
@@ -39,7 +39,7 @@ from The Open Group.
39#ifdef SECURE_RPC 39#ifdef SECURE_RPC
40 40
41#include <X11/X.h> 41#include <X11/X.h>
42#include "Xauth.h" 42#include <X11/Xauth.h>
43#include "misc.h" 43#include "misc.h"
44#include "os.h" 44#include "os.h"
45#include "dixstruct.h" 45#include "dixstruct.h"
@@ -135,7 +135,7 @@ CheckNetName (
135 135
136static char rpc_error[MAXNETNAMELEN+50]; 136static char rpc_error[MAXNETNAMELEN+50];
137 137
138XID 138_X_HIDDEN XID
139SecureRPCCheck (unsigned short data_length, char *data, 139SecureRPCCheck (unsigned short data_length, char *data,
140 ClientPtr client, char **reason) 140 ClientPtr client, char **reason)
141{ 141{
@@ -159,14 +159,14 @@ SecureRPCCheck (unsigned short data_length, char *data,
159 return (XID) ~0L; 159 return (XID) ~0L;
160} 160}
161 161
162void 162_X_HIDDEN void
163SecureRPCInit (void) 163SecureRPCInit (void)
164{ 164{
165 if (rpc_id == ~0L) 165 if (rpc_id == ~0L)
166 AddAuthorization (9, "SUN-DES-1", 0, (char *) 0); 166 AddAuthorization (9, "SUN-DES-1", 0, (char *) 0);
167} 167}
168 168
169int 169_X_HIDDEN int
170SecureRPCAdd (unsigned short data_length, char *data, XID id) 170SecureRPCAdd (unsigned short data_length, char *data, XID id)
171{ 171{
172 if (data_length) 172 if (data_length)
@@ -175,26 +175,26 @@ SecureRPCAdd (unsigned short data_length, char *data, XID id)
175 return 1; 175 return 1;
176} 176}
177 177
178int 178_X_HIDDEN int
179SecureRPCReset (void) 179SecureRPCReset (void)
180{ 180{
181 rpc_id = (XID) ~0L; 181 rpc_id = (XID) ~0L;
182 return 1; 182 return 1;
183} 183}
184 184
185XID 185_X_HIDDEN XID
186SecureRPCToID (unsigned short data_length, char *data) 186SecureRPCToID (unsigned short data_length, char *data)
187{ 187{
188 return rpc_id; 188 return rpc_id;
189} 189}
190 190
191int 191_X_HIDDEN int
192SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap) 192SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
193{ 193{
194 return 0; 194 return 0;
195} 195}
196 196
197int 197_X_HIDDEN int
198SecureRPCRemove (unsigned short data_length, char *data) 198SecureRPCRemove (unsigned short data_length, char *data)
199{ 199{
200 return 0; 200 return 0;