From cf398e78cfd22adb3b4b03607146218257cfda72 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 6 Nov 2016 14:00:37 +0000 Subject: [PATCH] More unused code, when xdm-authorization is not used. --- app/xenodm/include/dm.h | 40 ++++++---------------------------------- app/xenodm/xenodm/auth.c | 6 +----- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/app/xenodm/include/dm.h b/app/xenodm/include/dm.h index 60a6e15e4..dd7721ca2 100644 --- a/app/xenodm/include/dm.h +++ b/app/xenodm/include/dm.h @@ -52,17 +52,12 @@ from The Open Group. # include # include # define Time_t time_t - -# include +# include -# ifdef _POSIX_SOURCE -# include -# else -# define _POSIX_SOURCE -# include -# undef _POSIX_SOURCE -# endif +# include + +# include # define waitCode(w) (WIFEXITED(w) ? WEXITSTATUS(w) : 0) # define waitSig(w) (WIFSIGNALED(w) ? WTERMSIG(w) : 0) # define waitCore(w) 0 /* not in POSIX. so what? */ @@ -149,21 +144,6 @@ struct display { # define PROTO_TIMEOUT (30 * 60) /* 30 minutes should be long enough */ # define XDM_BROKEN_INTERVAL (120) /* server crashing more than once within */ /* two minutes is assumed to be broken! */ -struct protoDisplay { - struct protoDisplay *next; - XdmcpNetaddr address; /* UDP address */ - int addrlen; /* UDP address length */ - unsigned long date; /* creation date */ - CARD16 displayNumber; - CARD16 connectionType; - ARRAY8 connectionAddress; - CARD32 sessionID; - Xauth *fileAuthorization; - Xauth *xdmcpAuthorization; - ARRAY8 authenticationName; - ARRAY8 authenticationData; - XdmAuthKeyRec key; -}; struct greet_info { char *name; /* user name */ @@ -193,13 +173,7 @@ struct verify_info { # define RESERVER_DISPLAY 3 /* force server termination */ # define OPENFAILED_DISPLAY 4 /* XOpenDisplay failed, retry */ -# ifndef TRUE -# define TRUE 1 -# define FALSE 0 -# endif - extern char *config; - extern char *servers; extern int request_port; extern int debugLevel; @@ -293,9 +267,7 @@ extern void WaitForChild (void); * CloseOnFork flags */ -#define CLOSE_ALWAYS 0 -#define LEAVE_FOR_DISPLAY 1 - -#include +# define CLOSE_ALWAYS 0 +# define LEAVE_FOR_DISPLAY 1 #endif /* _DM_H_ */ diff --git a/app/xenodm/xenodm/auth.c b/app/xenodm/xenodm/auth.c index 5a5dee540..f879205fe 100644 --- a/app/xenodm/xenodm/auth.c +++ b/app/xenodm/xenodm/auth.c @@ -61,16 +61,12 @@ struct AuthProtocol { const char *name; void (*InitAuth)(unsigned short len, char *name); Xauth *(*GetAuth)(unsigned short len, char *name); - void (*GetXdmcpAuth)( - struct protoDisplay *pdpy, - unsigned short authorizationNameLen, - char *authorizationName); int inited; }; static struct AuthProtocol AuthProtocols[] = { { (unsigned short) 18, "MIT-MAGIC-COOKIE-1", - MitInitAuth, MitGetAuth, NULL + MitInitAuth, MitGetAuth, }, };