Actually build Secure RPC authentication support (missed in modularization)
This commit is contained in:
		
							parent
							
								
									6a32a96d8d
								
							
						
					
					
						commit
						23fbd5292d
					
				| 
						 | 
					@ -597,6 +597,7 @@ XTRANS_CONNECTION_FLAGS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Secure RPC detection macro from xtrans.m4
 | 
					# Secure RPC detection macro from xtrans.m4
 | 
				
			||||||
XTRANS_SECURE_RPC_FLAGS
 | 
					XTRANS_SECURE_RPC_FLAGS
 | 
				
			||||||
 | 
					AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
 | 
					AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86])
 | 
				
			||||||
AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
 | 
					AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu])
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -282,6 +282,9 @@
 | 
				
			||||||
/* Support MIT-SCREEN-SAVER extension */
 | 
					/* Support MIT-SCREEN-SAVER extension */
 | 
				
			||||||
#undef SCREENSAVER
 | 
					#undef SCREENSAVER
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */
 | 
				
			||||||
 | 
					#undef SECURE_RPC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Use a lock to prevent multiple servers on a display */
 | 
					/* Use a lock to prevent multiple servers on a display */
 | 
				
			||||||
#undef SERVER_LOCK
 | 
					#undef SERVER_LOCK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,9 +3,9 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la
 | 
				
			||||||
AM_CFLAGS = $(DIX_CFLAGS)
 | 
					AM_CFLAGS = $(DIX_CFLAGS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# FIXME: Add support for these in configure.ac
 | 
					# FIXME: Add support for these in configure.ac
 | 
				
			||||||
SECURERPC_SRCS = rpcauth.c
 | 
					 | 
				
			||||||
INTERNALMALLOC_SRCS = xalloc.c
 | 
					INTERNALMALLOC_SRCS = xalloc.c
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SECURERPC_SRCS = rpcauth.c
 | 
				
			||||||
XCSECURITY_SRCS = secauth.c
 | 
					XCSECURITY_SRCS = secauth.c
 | 
				
			||||||
XDMCP_SRCS = xdmcp.c
 | 
					XDMCP_SRCS = xdmcp.c
 | 
				
			||||||
STRLCAT_SRCS = strlcat.c strlcpy.c
 | 
					STRLCAT_SRCS = strlcat.c strlcpy.c
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,10 @@ libos_la_SOURCES = 	\
 | 
				
			||||||
	xprintf.c	\
 | 
						xprintf.c	\
 | 
				
			||||||
	$(XORG_SRCS)
 | 
						$(XORG_SRCS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if SECURE_RPC
 | 
				
			||||||
 | 
					libos_la_SOURCES += $(SECURERPC_SRCS)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if XCSECURITY
 | 
					if XCSECURITY
 | 
				
			||||||
libos_la_SOURCES += $(XCSECURITY_SRCS)
 | 
					libos_la_SOURCES += $(XCSECURITY_SRCS)
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										16
									
								
								os/rpcauth.c
								
								
								
								
							
							
						
						
									
										16
									
								
								os/rpcauth.c
								
								
								
								
							| 
						 | 
					@ -39,7 +39,7 @@ from The Open Group.
 | 
				
			||||||
#ifdef SECURE_RPC
 | 
					#ifdef SECURE_RPC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <X11/X.h>
 | 
					#include <X11/X.h>
 | 
				
			||||||
#include "Xauth.h"
 | 
					#include <X11/Xauth.h>
 | 
				
			||||||
#include "misc.h"
 | 
					#include "misc.h"
 | 
				
			||||||
#include "os.h"
 | 
					#include "os.h"
 | 
				
			||||||
#include "dixstruct.h"
 | 
					#include "dixstruct.h"
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ CheckNetName (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static char rpc_error[MAXNETNAMELEN+50];
 | 
					static char rpc_error[MAXNETNAMELEN+50];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XID
 | 
					_X_HIDDEN XID
 | 
				
			||||||
SecureRPCCheck (unsigned short data_length, char *data, 
 | 
					SecureRPCCheck (unsigned short data_length, char *data, 
 | 
				
			||||||
    ClientPtr client, char **reason)
 | 
					    ClientPtr client, char **reason)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -159,14 +159,14 @@ SecureRPCCheck (unsigned short data_length, char *data,
 | 
				
			||||||
    return (XID) ~0L;
 | 
					    return (XID) ~0L;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
void
 | 
					_X_HIDDEN void
 | 
				
			||||||
SecureRPCInit (void)
 | 
					SecureRPCInit (void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (rpc_id == ~0L)
 | 
					    if (rpc_id == ~0L)
 | 
				
			||||||
	AddAuthorization (9, "SUN-DES-1", 0, (char *) 0);
 | 
						AddAuthorization (9, "SUN-DES-1", 0, (char *) 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					_X_HIDDEN int
 | 
				
			||||||
SecureRPCAdd (unsigned short data_length, char *data, XID id)
 | 
					SecureRPCAdd (unsigned short data_length, char *data, XID id)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (data_length)
 | 
					    if (data_length)
 | 
				
			||||||
| 
						 | 
					@ -175,26 +175,26 @@ SecureRPCAdd (unsigned short data_length, char *data, XID id)
 | 
				
			||||||
    return 1;
 | 
					    return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					_X_HIDDEN int
 | 
				
			||||||
SecureRPCReset (void)
 | 
					SecureRPCReset (void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    rpc_id = (XID) ~0L;
 | 
					    rpc_id = (XID) ~0L;
 | 
				
			||||||
    return 1;
 | 
					    return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XID
 | 
					_X_HIDDEN XID
 | 
				
			||||||
SecureRPCToID (unsigned short data_length, char *data)
 | 
					SecureRPCToID (unsigned short data_length, char *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return rpc_id;
 | 
					    return rpc_id;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					_X_HIDDEN int
 | 
				
			||||||
SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
 | 
					SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					_X_HIDDEN int
 | 
				
			||||||
SecureRPCRemove (unsigned short data_length, char *data)
 | 
					SecureRPCRemove (unsigned short data_length, char *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue