1 /* 2 * (c) Copyright 1992 by Panagiotis Tsirigotis 3 * (c) Sections Copyright 1998-2001 by Rob Braun 4 * All rights reserved. The file named COPYRIGHT specifies the terms 5 * and conditions for redistribution. 6 */ 7 8 #ifndef XCONFIG_H 9 #define XCONFIG_H 10 11 /* 12 * $Id: xconfig.h,v 1.1.1.1 2003-02-19 17:29:28 bbraun Exp $ 13 */ 14 15 /* 16 * Deal with stupid Compaq (DEC) Unix problem ... 17 */ 18 #ifdef __osf__ 19 #undef DUMP_FILE 20 #endif 21 22 /* 23 * The purpose of customconf.h is to allow the override of 24 * constants defined in this file. These include all constants that 25 * cannot be overriden from the command line via some option. 26 */ 27 #ifdef CUSTOMCONF 28 #include "customconf.h" 29 #endif 30 31 32 #define DEFAULT_CONFIG_FILE "/usr/local/etc/xinetd.conf" 33 34 /* 35 * This is the facility used by xinetd to log syslog messages 36 */ 37 #define DEFAULT_SYSLOG_FACILITY LOG_DAEMON 38 39 /* 40 * This is the level used for log messages when a service logs to syslog 41 */ 42 #define DEFAULT_SERVICE_SYSLOG_LEVEL LOG_INFO 43 44 /* 45 * Max number of concurrently running processes forked to get 46 * the user id from the remote host 47 */ 48 #define DEFAULT_LOGPROCS 15 49 50 /* 51 * The loop rate is a bound on the rate of forking servers for a 52 * particular service. If that rate is exceeded, the service is deactivated. 53 */ 54 #define DEFAULT_LOOP_RATE 50 55 56 /* 57 * The number of seconds to wait before re-enabling a looping service. 58 */ 59 #define DEFAULT_LOOP_TIME 10 60 61 /* 62 * Signal-to-action mapping 63 */ 64 #ifndef RECONFIG_HARD_SIG 65 #define RECONFIG_HARD_SIG SIGHUP 66 #endif 67 #ifndef OLD_RECONFIG_HARD_SIG 68 #define OLD_RECONFIG_HARD_SIG SIGUSR2 69 #endif 70 #ifndef TERMINATION_SIG 71 #define TERMINATION_SIG SIGTERM 72 #endif 73 #ifndef STATE_DUMP_SIG 74 #define STATE_DUMP_SIG SIGUSR1 75 #endif 76 #ifndef CONSISTENCY_CHECK_SIG 77 #define CONSISTENCY_CHECK_SIG SIGIOT 78 #endif 79 #ifndef SERVER_EXIT_SIG 80 #define SERVER_EXIT_SIG SIGCHLD 81 #endif 82 #ifndef QUIT_SIG 83 #define QUIT_SIG SIGQUIT 84 #endif 85 86 /* 87 * This is the file where the internal state of xinetd is dumped upon 88 * receipt of STATE_DUMP_SIG 89 */ 90 #ifndef DUMP_FILE 91 #define DUMP_FILE "/var/run/xinetd.dump" 92 #endif 93 94 /* 95 * There are 2 timeouts (in seconds) when trying to get the user id from 96 * the remote host. Any timeout value specified as 0 implies an infinite 97 * timeout. 98 * LOGUSER_SUCCESS_TIMEOUT is the timeout when access control has been passed 99 * and a new process has been forked to exec the server. 100 * LOGUSER_FAILURE_TIMEOUT is the timeout when the attempt to access the 101 * service has been rejected. 102 * 103 * Both timeouts should be at least 30 seconds as suggested in RFC 1413 104 * (assuming they are not 'infinite' timeouts). 105 */ 106 #ifndef LOGUSER_SUCCESS_TIMEOUT 107 #define LOGUSER_SUCCESS_TIMEOUT 30 108 #endif 109 #ifndef LOGUSER_FAILURE_TIMEOUT 110 #define LOGUSER_FAILURE_TIMEOUT 30 111 #endif 112 113 /* 114 * This is used when an instance limit is not specified for a service 115 * and the defaults entry does not specify an instance limit either. 116 * It can be a positive number or "UNLIMITED". 117 */ 118 #ifndef DEFAULT_INSTANCE_LIMIT 119 #define DEFAULT_INSTANCE_LIMIT UNLIMITED 120 #endif 121 122 /* 123 * This is the interval (in seconds) over which we check if the service 124 * loop rate has been exceeded. 125 */ 126 #ifndef LOOP_INTERVAL 127 #define LOOP_INTERVAL 2 128 #endif 129 130 /* 131 * LOG_OPEN_FLAGS are the flags used to open a log file (this is used as 132 * the 3rd argument of open(2)) 133 */ 134 #ifndef LOG_OPEN_FLAGS 135 #define LOG_OPEN_FLAGS O_CREAT+O_APPEND+O_WRONLY 136 #endif 137 138 /* 139 * Number of consecutive fork failures that we are willing to put up with 140 * before giving up. 141 */ 142 #ifndef MAX_FORK_FAILURES 143 #define MAX_FORK_FAILURES 5 144 #endif 145 146 /* 147 * This is the time period during which we will not log subsequest attempts 148 * to access a datagram-based service from the same bad address after logging 149 * the first one. 150 * For example, if we receive a datagram at time t from address A which 151 * has a match in the no_access list, we will log the failed attempt and 152 * during the interval (t, t+DGRAM_IGNORE_TIME) we will not log attempts 153 * from address A (for the same service). 154 * In this context, the address is defined as (IP address, port number). 155 */ 156 #ifndef DGRAM_IGNORE_TIME 157 #define DGRAM_IGNORE_TIME 60 /* seconds */ 158 #endif 159 160 #ifndef DUMP_FILE_MODE 161 #define DUMP_FILE_MODE 0644 162 #endif 163 164 #ifndef LOG_FILE_MODE 165 #define LOG_FILE_MODE 0644 166 #endif 167 168 /* 169 * The DATAGRAM_SIZE should be big enough for an ethernet packet 170 */ 171 #ifndef DATAGRAM_SIZE 172 #define DATAGRAM_SIZE 2048 173 #endif 174 175 /* 176 * Time interval between retry attempts 177 */ 178 #ifndef RETRY_INTERVAL 179 #define RETRY_INTERVAL 5 /* seconds */ 180 #endif 181 182 /* 183 * LOG_EXTRA_MIN, LOG_EXTRA_MAX define the limits by which the hard limit 184 * on the log size can exceed the soft limit 185 */ 186 #ifndef LOG_EXTRA_MIN 187 #define LOG_EXTRA_MIN ( 5 * 1024 ) 188 #endif 189 #ifndef LOG_EXTRA_MAX 190 #define LOG_EXTRA_MAX ( 20 * 1024 ) 191 #endif 192 193 /* 194 * If SENSORS are used and someone trips it, they are added to the 195 * global_no_access table for whatever the configured time is. This 196 * define determines the size of the table to use. 197 */ 198 #define MAX_GLOBAL_NO_ACCESS 10240 199 200 201 #endif /* CONFIG_H */ 202