diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-17 15:29:16 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-17 15:29:47 -0700 |
commit | 23fbd5292d356067e85e1eec4eb4f743532b0503 (patch) | |
tree | 3255e7d3429dba3fc13d9e98eeabcedf9fa75ebf | |
parent | 6a32a96d8df184c3ace4847beb48fdcb846d2286 (diff) |
Actually build Secure RPC authentication support (missed in modularization)
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | include/dix-config.h.in | 3 | ||||
-rw-r--r-- | os/Makefile.am | 6 | ||||
-rw-r--r-- | os/rpcauth.c | 16 |
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 |
599 | XTRANS_SECURE_RPC_FLAGS | 599 | XTRANS_SECURE_RPC_FLAGS |
600 | AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes]) | ||
600 | 601 | ||
601 | AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) | 602 | AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) |
602 | AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) | 603 | AM_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 | |||
3 | AM_CFLAGS = $(DIX_CFLAGS) | 3 | AM_CFLAGS = $(DIX_CFLAGS) |
4 | 4 | ||
5 | # FIXME: Add support for these in configure.ac | 5 | # FIXME: Add support for these in configure.ac |
6 | SECURERPC_SRCS = rpcauth.c | ||
7 | INTERNALMALLOC_SRCS = xalloc.c | 6 | INTERNALMALLOC_SRCS = xalloc.c |
8 | 7 | ||
8 | SECURERPC_SRCS = rpcauth.c | ||
9 | XCSECURITY_SRCS = secauth.c | 9 | XCSECURITY_SRCS = secauth.c |
10 | XDMCP_SRCS = xdmcp.c | 10 | XDMCP_SRCS = xdmcp.c |
11 | STRLCAT_SRCS = strlcat.c strlcpy.c | 11 | STRLCAT_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 | ||
31 | if SECURE_RPC | ||
32 | libos_la_SOURCES += $(SECURERPC_SRCS) | ||
33 | endif | ||
34 | |||
31 | if XCSECURITY | 35 | if XCSECURITY |
32 | libos_la_SOURCES += $(XCSECURITY_SRCS) | 36 | libos_la_SOURCES += $(XCSECURITY_SRCS) |
33 | endif | 37 | endif |
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 | ||
136 | static char rpc_error[MAXNETNAMELEN+50]; | 136 | static char rpc_error[MAXNETNAMELEN+50]; |
137 | 137 | ||
138 | XID | 138 | _X_HIDDEN XID |
139 | SecureRPCCheck (unsigned short data_length, char *data, | 139 | SecureRPCCheck (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 | ||
162 | void | 162 | _X_HIDDEN void |
163 | SecureRPCInit (void) | 163 | SecureRPCInit (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 | ||
169 | int | 169 | _X_HIDDEN int |
170 | SecureRPCAdd (unsigned short data_length, char *data, XID id) | 170 | SecureRPCAdd (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 | ||
178 | int | 178 | _X_HIDDEN int |
179 | SecureRPCReset (void) | 179 | SecureRPCReset (void) |
180 | { | 180 | { |
181 | rpc_id = (XID) ~0L; | 181 | rpc_id = (XID) ~0L; |
182 | return 1; | 182 | return 1; |
183 | } | 183 | } |
184 | 184 | ||
185 | XID | 185 | _X_HIDDEN XID |
186 | SecureRPCToID (unsigned short data_length, char *data) | 186 | SecureRPCToID (unsigned short data_length, char *data) |
187 | { | 187 | { |
188 | return rpc_id; | 188 | return rpc_id; |
189 | } | 189 | } |
190 | 190 | ||
191 | int | 191 | _X_HIDDEN int |
192 | SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap) | 192 | SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap) |
193 | { | 193 | { |
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
197 | int | 197 | _X_HIDDEN int |
198 | SecureRPCRemove (unsigned short data_length, char *data) | 198 | SecureRPCRemove (unsigned short data_length, char *data) |
199 | { | 199 | { |
200 | return 0; | 200 | return 0; |