comparison lib-src/gnuserv.h @ 954:cb345077c98c

[xemacs-hg @ 2002-08-05 16:34:07 by james] Include signal.h early to define NSIG before config.h is included.
author james
date Mon, 05 Aug 2002 16:34:07 +0000
parents 943eaba38521
children 13e47461d509
comparison
equal deleted inserted replaced
953:c1e8977783ed 954:cb345077c98c
36 * value of TMPDIR is not shared by client and server at run-time. 36 * value of TMPDIR is not shared by client and server at run-time.
37 */ 37 */
38 #define USE_TMPDIR 38 #define USE_TMPDIR
39 39
40 #define PATCHLEVEL 2 40 #define PATCHLEVEL 2
41
42 #define NO_SHORTNAMES
43 /* gnuserv should not be compiled using SOCKS */
44 #define DO_NOT_SOCKSIFY
45 #include <config.h>
46 #undef signal
47
48 /* Define the communication method between server and clients:
49 * You can have either or both kinds of sockets, but you can't mix
50 * sockets with sysv ipc
51 */
52
53
54 #define INTERNET_DOMAIN_SOCKETS
55 #ifdef HAVE_SYS_UN_H
56 #define UNIX_DOMAIN_SOCKETS
57 /* #define SYSV_IPC */
58 #endif
59
60 /*
61 * Define additional authentication protocols to be used. These methods will
62 * be tried before falling back to the default gnuserv protocol (based on
63 * the GNU_SECURE environment variable). Currently, only MIT-MAGIC-COOKIE-1
64 * is also supported.
65 *
66 * Comment out the next line(s) if you don't want to enable the
67 * appropriate authentication protocol.
68 */
69
70 #if defined (HAVE_XAUTH)
71 #define AUTH_MAGIC_COOKIE
72 #endif /* HAVE_XAUTH */
73
74 /*
75 * stuff related to supporting MIT-MAGIC-COOKIE-1
76 */
77
78 #define MCOOKIE_SCREEN "999" /* screen # to use as the gnuserv cookie */
79 #define MCOOKIE_NAME "MAGIC-1" /* authentication protocol name */
80 #define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1" /* as needed by X */
81
82
83 #define DEFAUTH_NAME "GNU-SECURE" /* name of default auth protocol */
84 #define AUTH_TIMEOUT 15 /* # seconds to wait for auth data */
85 #define AUTH_NAMESZ 15 /* max allows auth protocol name size */
86
87
88 /*
89 * Pick a default communication scheme, if none was specified.
90 */
91
92 #if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS)
93
94 #ifdef HAVE_SYSVIPC
95 #define SYSV_IPC /* SYSV systems use SYSV IPC by default */
96 #endif /* HAVE_SYSVIPC */
97
98 #ifdef BSD
99 #define UNIX_DOMAIN_SOCKETS /* BSD systems use Unix Domain sockets by default */
100 #endif /* BSD */
101
102 #endif /* No communication method pre-defined */
103 41
104 #include <sys/types.h> 42 #include <sys/types.h>
105 #include <sys/param.h> 43 #include <sys/param.h>
106 #include <sys/stat.h> 44 #include <sys/stat.h>
107 #include <stdio.h> 45 #include <stdio.h>
108 #include <stdlib.h> 46 #include <stdlib.h>
109 #include <string.h> 47 #include <string.h>
110 #include <signal.h> 48 #include <signal.h>
111 #include <errno.h> 49 #include <errno.h>
50
51 #define NO_SHORTNAMES
52 /* gnuserv should not be compiled using SOCKS */
53 #define DO_NOT_SOCKSIFY
54 #include <config.h>
55 #undef signal
56
57 /* Define the communication method between server and clients:
58 * You can have either or both kinds of sockets, but you can't mix
59 * sockets with sysv ipc
60 */
61
62
63 #define INTERNET_DOMAIN_SOCKETS
64 #ifdef HAVE_SYS_UN_H
65 #define UNIX_DOMAIN_SOCKETS
66 /* #define SYSV_IPC */
67 #endif
68
69 /*
70 * Define additional authentication protocols to be used. These methods will
71 * be tried before falling back to the default gnuserv protocol (based on
72 * the GNU_SECURE environment variable). Currently, only MIT-MAGIC-COOKIE-1
73 * is also supported.
74 *
75 * Comment out the next line(s) if you don't want to enable the
76 * appropriate authentication protocol.
77 */
78
79 #if defined (HAVE_XAUTH)
80 #define AUTH_MAGIC_COOKIE
81 #endif /* HAVE_XAUTH */
82
83 /*
84 * stuff related to supporting MIT-MAGIC-COOKIE-1
85 */
86
87 #define MCOOKIE_SCREEN "999" /* screen # to use as the gnuserv cookie */
88 #define MCOOKIE_NAME "MAGIC-1" /* authentication protocol name */
89 #define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1" /* as needed by X */
90
91
92 #define DEFAUTH_NAME "GNU-SECURE" /* name of default auth protocol */
93 #define AUTH_TIMEOUT 15 /* # seconds to wait for auth data */
94 #define AUTH_NAMESZ 15 /* max allows auth protocol name size */
95
96
97 /*
98 * Pick a default communication scheme, if none was specified.
99 */
100
101 #if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS)
102
103 #ifdef HAVE_SYSVIPC
104 #define SYSV_IPC /* SYSV systems use SYSV IPC by default */
105 #endif /* HAVE_SYSVIPC */
106
107 #ifdef BSD
108 #define UNIX_DOMAIN_SOCKETS /* BSD systems use Unix Domain sockets by default */
109 #endif /* BSD */
110
111 #endif /* No communication method pre-defined */
112 112
113 #ifdef HAVE_UNISTD_H 113 #ifdef HAVE_UNISTD_H
114 #include <unistd.h> 114 #include <unistd.h>
115 #endif 115 #endif
116 116