00001 /* Copyright (C) 1995-1998 Samba-Team */ 00002 /* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */ 00003 00004 /* local definitions for file server */ 00005 #ifndef _LOCAL_H 00006 #define _LOCAL_H 00007 00008 /* The default workgroup - usually overridden in smb.conf */ 00009 #ifndef WORKGROUP 00010 #define WORKGROUP "WORKGROUP" 00011 #endif 00012 00013 /* the maximum debug level to compile into the code. This assumes a good 00014 optimising compiler that can remove unused code 00015 for embedded or low-memory systems set this to a value like 2 to get 00016 only important messages. This gives *much* smaller binaries 00017 */ 00018 #ifndef MAX_DEBUG_LEVEL 00019 #define MAX_DEBUG_LEVEL 1000 00020 #endif 00021 00022 /* This defines the section name in the configuration file that will contain */ 00023 /* global parameters - that is, parameters relating to the whole server, not */ 00024 /* just services. This name is then reserved, and may not be used as a */ 00025 /* a service name. It will default to "global" if not defined here. */ 00026 #define GLOBAL_NAME "global" 00027 #define GLOBAL_NAME2 "globals" 00028 00029 /* This defines the section name in the configuration file that will 00030 refer to the special "homes" service */ 00031 #define HOMES_NAME "homes" 00032 00033 /* This defines the section name in the configuration file that will 00034 refer to the special "printers" service */ 00035 #define PRINTERS_NAME "printers" 00036 00037 /* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this */ 00038 /* to a maximum of 8 if old smb clients break because of long printer names. */ 00039 #define MAXPRINTERLEN 15 00040 00041 /* max number of directories open at once */ 00042 /* note that with the new directory code this no longer requires a 00043 file handle per directory, but large numbers do use more memory */ 00044 #define MAX_OPEN_DIRECTORIES 256 00045 00046 /* max number of directory handles */ 00047 /* As this now uses the bitmap code this can be 00048 quite large. */ 00049 #define MAX_DIRECTORY_HANDLES 2048 00050 00051 /* maximum number of file caches per smbd */ 00052 #define MAX_WRITE_CACHES 10 00053 00054 /* define what facility to use for syslog */ 00055 #ifndef SYSLOG_FACILITY 00056 #define SYSLOG_FACILITY LOG_DAEMON 00057 #endif 00058 00059 /* 00060 * Default number of maximum open files per smbd. This is 00061 * also limited by the maximum available file descriptors 00062 * per process and can also be set in smb.conf as "max open files" 00063 * in the [global] section. 00064 */ 00065 00066 #ifndef MAX_OPEN_FILES 00067 #define MAX_OPEN_FILES 10000 00068 #endif 00069 00070 #define WORDMAX 0xFFFF 00071 00072 /* the maximum password length before we declare a likely attack */ 00073 #define MAX_PASS_LEN 200 00074 00075 /* separators for lists */ 00076 #define LIST_SEP " \t,;\n\r" 00077 00078 /* wchar separators for lists */ 00079 #define LIST_SEP_W wchar_list_sep 00080 00081 /* this is where browse lists are kept in the lock dir */ 00082 #define SERVER_LIST "browse.dat" 00083 00084 /* shall filenames with illegal chars in them get mangled in long 00085 filename listings? */ 00086 #define MANGLE_LONG_FILENAMES 00087 00088 /* define this if you want to stop spoofing with .. and soft links 00089 NOTE: This also slows down the server considerably */ 00090 #define REDUCE_PATHS 00091 00092 /* the size of the directory cache */ 00093 #define DIRCACHESIZE 20 00094 00095 /* what default type of filesystem do we want this to show up as in a 00096 NT file manager window? */ 00097 #define FSTYPE_STRING "NTFS" 00098 00099 /* the default guest account - normally set in the Makefile or smb.conf */ 00100 #ifndef GUEST_ACCOUNT 00101 #define GUEST_ACCOUNT "nobody" 00102 #endif 00103 00104 /* user to test password server with as invalid in security=server mode. */ 00105 #ifndef INVALID_USER_PREFIX 00106 #define INVALID_USER_PREFIX "sambatest" 00107 #endif 00108 00109 /* the default pager to use for the client "more" command. Users can 00110 override this with the PAGER environment variable */ 00111 #ifndef PAGER 00112 #define PAGER "more" 00113 #endif 00114 00115 /* the size of the uid cache used to reduce valid user checks */ 00116 #define VUID_CACHE_SIZE 32 00117 00118 /* the following control timings of various actions. Don't change 00119 them unless you know what you are doing. These are all in seconds */ 00120 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7) 00121 #define SMBD_RELOAD_CHECK (180) 00122 #define IDLE_CLOSED_TIMEOUT (60) 00123 #define DPTR_IDLE_TIMEOUT (120) 00124 #define SMBD_SELECT_TIMEOUT (60) 00125 #define NMBD_SELECT_LOOP (10) 00126 #define BROWSE_INTERVAL (60) 00127 #define REGISTRATION_INTERVAL (10*60) 00128 #define NMBD_INETD_TIMEOUT (120) 00129 #define NMBD_MAX_TTL (24*60*60) 00130 #define LPQ_LOCK_TIMEOUT (5) 00131 #define NMBD_INTERFACES_RELOAD (120) 00132 #define NMBD_UNEXPECTED_TIMEOUT (15) 00133 00134 /* the following are in milliseconds */ 00135 #define LOCK_RETRY_TIMEOUT (100) 00136 00137 /* do you want to dump core (carefully!) when an internal error is 00138 encountered? Samba will be careful to make the core file only 00139 accessible to root */ 00140 #define DUMP_CORE 1 00141 00142 /* shall we support browse requests via a FIFO to nmbd? */ 00143 #define ENABLE_FIFO 1 00144 00145 /* how long (in miliseconds) to wait for a socket connect to happen */ 00146 #define LONG_CONNECT_TIMEOUT 30000 00147 #define SHORT_CONNECT_TIMEOUT 5000 00148 00149 /* the default netbios keepalive timeout */ 00150 #define DEFAULT_KEEPALIVE 300 00151 00152 /* the directory to sit in when idle */ 00153 /* #define IDLE_DIR "/" */ 00154 00155 /* Timout (in seconds) to wait for an oplock break 00156 message to return from the client. */ 00157 00158 #define OPLOCK_BREAK_TIMEOUT 30 00159 00160 /* Timout (in seconds) to add to the oplock break timeout 00161 to wait for the smbd to smbd message to return. */ 00162 00163 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2 00164 00165 /* the read preciction code has been disabled until some problems with 00166 it are worked out */ 00167 #define USE_READ_PREDICTION 0 00168 00169 /* 00170 * Default passwd chat script. 00171 */ 00172 00173 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*" 00174 00175 /* Minimum length of allowed password when changing UNIX password. */ 00176 #define MINPASSWDLENGTH 5 00177 00178 /* maximum ID number used for session control. This cannot be larger 00179 than 62*62 for the current code */ 00180 #define MAX_SESSION_ID 3000 00181 00182 /* For the benifit of PAM and the 'session exec' scripts, we fake up a terminal 00183 name. This can be in one of two forms: The first for systems not using 00184 utmp (and therefore not constrained as to length or the need for a number 00185 < 3000 or so) and the second for systems with this 'well behaved terminal 00186 like name' constraint. 00187 */ 00188 00189 #ifndef SESSION_TEMPLATE 00190 /* Paramaters are 'pid' and 'vuid' */ 00191 #define SESSION_TEMPLATE "smb/%lu/%d" 00192 #endif 00193 00194 #ifndef SESSION_UTMP_TEMPLATE 00195 #define SESSION_UTMP_TEMPLATE "smb/%d" 00196 #endif 00197 00198 /* the maximum age in seconds of a password. Should be a lp_ parameter */ 00199 #define MAX_PASSWORD_AGE (21*24*60*60) 00200 00201 /* Default allocation roundup. */ 00202 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000 00203 00204 /* shall we deny oplocks to clients that get timeouts? */ 00205 #define FASCIST_OPLOCK_BACKOFF 1 00206 00207 /* this enables the "rabbit pellet" fix for SMBwritebraw */ 00208 #define RABBIT_PELLET_FIX 1 00209 00210 /* Max number of jobs per print queue. */ 00211 #define PRINT_MAX_JOBID 10000 00212 00213 /* Max number of open RPC pipes. */ 00214 #define MAX_OPEN_PIPES 2048 00215 00216 /* Tuning for server auth mutex. */ 00217 #define CLI_AUTH_TIMEOUT 5000 /* In milli-seconds. */ 00218 #define NUM_CLI_AUTH_CONNECT_RETRIES 3 00219 /* Number in seconds to wait for the mutex. This must be less than 30 seconds. */ 00220 #define SERVER_MUTEX_WAIT_TIME ( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5) 00221 /* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */ 00222 #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2) 00223 00224 /* Max number of simultaneous winbindd socket connections. */ 00225 #define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200 00226 00227 /* Buffer size to use when printing backtraces */ 00228 #define BACKTRACE_STACK_SIZE 64 00229 00230 /* size of listen() backlog in smbd */ 00231 #define SMBD_LISTEN_BACKLOG 50 00232 00233 /* Number of microseconds to wait before a sharing violation. */ 00234 #define SHARING_VIOLATION_USEC_WAIT 950000 00235 00236 #define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */ 00237 00238 /* tdb hash size for the open database. */ 00239 #define SMB_OPEN_DATABASE_TDB_HASH_SIZE 10007 00240 00241 /* Characters we disallow in sharenames. */ 00242 #define INVALID_SHARENAME_CHARS "%<>*?|/\\+=;:\"," 00243 00244 /* Seconds between connection attempts to a remote server. */ 00245 #define FAILED_CONNECTION_CACHE_TIMEOUT 30 00246 00247 /* Default hash size for the winbindd cache. */ 00248 #define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000 00249 00250 /* Windows minimum lock resolution timeout in ms */ 00251 #define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200 00252 00253 #endif
1.4.7