allow a MAX_DEBUG_LEVEL setting in local.h (or the Makefile)
[samba.git] / source3 / include / local.h
1 /* Copyright (C) 1995-1998 Samba-Team */
2 /* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
3
4 /* local definitions for file server */
5 #ifndef _LOCAL_H
6 #define _LOCAL_H
7
8 /* The default workgroup - usually overridden in smb.conf */
9 #ifndef WORKGROUP
10 #define WORKGROUP "WORKGROUP"
11 #endif
12
13 /* the maximum debug level to compile into the code. This assumes a good 
14    optimising compiler that can remove unused code 
15    for embedded or low-memory systems set this to a value like 2 to get
16    only important messages. This gives *much* smaller binaries
17 */
18 #ifndef MAX_DEBUG_LEVEL
19 #define MAX_DEBUG_LEVEL 1000
20 #endif
21
22 /* This defines the section name in the configuration file that will contain */
23 /* global parameters - that is, parameters relating to the whole server, not */
24 /* just services. This name is then reserved, and may not be used as a       */
25 /* a service name. It will default to "global" if not defined here.          */
26 #define GLOBAL_NAME "global"
27 #define GLOBAL_NAME2 "globals"
28
29 /* This defines the section name in the configuration file that will
30    refer to the special "homes" service */
31 #define HOMES_NAME "homes"
32
33 /* This defines the section name in the configuration file that will
34    refer to the special "printers" service */
35 #define PRINTERS_NAME "printers"
36
37 /* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this       */
38 /* to a maximum of 8 if old smb clients break because of long printer names. */
39 #define MAXPRINTERLEN 15
40
41 /* max number of directories open at once */
42 /* note that with the new directory code this no longer requires a
43    file handle per directory, but large numbers do use more memory */
44 #define MAX_OPEN_DIRECTORIES 256
45
46 /* max number of directory handles */
47 /* As this now uses the bitmap code this can be
48    quite large. */
49 #define MAX_DIRECTORY_HANDLES 2048
50
51 /* maximum number of file caches per smbd */
52 #define MAX_WRITE_CACHES 10
53
54 /* define what facility to use for syslog */
55 #ifndef SYSLOG_FACILITY
56 #define SYSLOG_FACILITY LOG_DAEMON
57 #endif
58
59 /* 
60  * Default number of maximum open files per smbd. This is
61  * also limited by the maximum available file descriptors
62  * per process and can also be set in smb.conf as "max open files"
63  * in the [global] section.
64  */
65
66 #ifndef MAX_OPEN_FILES
67 #define MAX_OPEN_FILES 10000
68 #endif
69  
70 /* the max number of simultanous connections to the server by all clients */
71 #define MAXSTATUS 100000
72
73 #define WORDMAX 0xFFFF
74
75 /* the maximum password length before we declare a likely attack */
76 #define MAX_PASS_LEN 200
77
78 /* separators for lists */
79 #define LIST_SEP " \t,;:\n\r"
80
81 /* wchar separators for lists */
82 #define LIST_SEP_W wchar_list_sep
83
84 /* this is where browse lists are kept in the lock dir */
85 #define SERVER_LIST "browse.dat"
86
87 /* shall filenames with illegal chars in them get mangled in long
88    filename listings? */
89 #define MANGLE_LONG_FILENAMES 
90
91 /* define this if you want to stop spoofing with .. and soft links
92    NOTE: This also slows down the server considerably */
93 #define REDUCE_PATHS
94
95 /* the size of the directory cache */
96 #define DIRCACHESIZE 20
97
98 /* what default type of filesystem do we want this to show up as in a
99    NT file manager window? */
100 #define FSTYPE_STRING "NTFS"
101
102 /* the default guest account - normally set in the Makefile or smb.conf */
103 #ifndef GUEST_ACCOUNT
104 #define GUEST_ACCOUNT "nobody"
105 #endif
106
107 /* user to test password server with as invalid in security=server mode. */
108 #ifndef INVALID_USER_PREFIX
109 #define INVALID_USER_PREFIX "sambatest"
110 #endif
111
112 /* the default pager to use for the client "more" command. Users can
113    override this with the PAGER environment variable */
114 #ifndef PAGER
115 #define PAGER "more"
116 #endif
117
118 /* the size of the uid cache used to reduce valid user checks */
119 #define UID_CACHE_SIZE 4
120
121 /* the following control timings of various actions. Don't change 
122    them unless you know what you are doing. These are all in seconds */
123 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
124 #define SMBD_RELOAD_CHECK (180)
125 #define IDLE_CLOSED_TIMEOUT (60)
126 #define DPTR_IDLE_TIMEOUT (120)
127 #define SMBD_SELECT_TIMEOUT (60)
128 #define SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS (10)
129 #define NMBD_SELECT_LOOP (10)
130 #define BROWSE_INTERVAL (60)
131 #define REGISTRATION_INTERVAL (10*60)
132 #define NMBD_INETD_TIMEOUT (120)
133 #define NMBD_MAX_TTL (24*60*60)
134 #define LPQ_LOCK_TIMEOUT (5)
135 #define NMBD_INTERFACES_RELOAD (120)
136 #define NMBD_UNEXPECTED_TIMEOUT (15)
137
138 /* the following are in milliseconds */
139 #define LOCK_RETRY_TIMEOUT (100)
140
141 /* do you want to dump core (carefully!) when an internal error is
142    encountered? Samba will be careful to make the core file only
143    accessible to root */
144 #define DUMP_CORE 1
145
146 /* shall we support browse requests via a FIFO to nmbd? */
147 #define ENABLE_FIFO 1
148
149 /* how long (in miliseconds) to wait for a socket connect to happen */
150 #define LONG_CONNECT_TIMEOUT 30000
151 #define SHORT_CONNECT_TIMEOUT 5000
152
153 /* the default netbios keepalive timeout */
154 #define DEFAULT_KEEPALIVE 300
155
156 /* the directory to sit in when idle */
157 /* #define IDLE_DIR "/" */
158
159 /* Timout (in seconds) to wait for an oplock break
160    message to return from the client. */
161
162 #define OPLOCK_BREAK_TIMEOUT 30
163
164 /* Timout (in seconds) to add to the oplock break timeout
165    to wait for the smbd to smbd message to return. */
166
167 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
168
169 /* the read preciction code has been disabled until some problems with
170    it are worked out */
171 #define USE_READ_PREDICTION 0
172
173 /* name of directory that netatalk uses to store macintosh resource forks */
174 #define APPLEDOUBLE ".AppleDouble/"
175
176 /*
177  * Default passwd chat script.
178  */
179
180 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
181
182 /* Minimum length of allowed password when changing UNIX password. */
183 #define MINPASSWDLENGTH 5
184
185 /* maximum ID number used for session control. This cannot be larger
186    than 62*62 for the current code */
187 #define MAX_SESSION_ID 3000
188
189 #ifndef SESSION_TEMPLATE
190 #define SESSION_TEMPLATE "smb/%d"
191 #endif
192
193 /* the maximum age in seconds of a password. Should be a lp_ parameter */
194 #define MAX_PASSWORD_AGE (21*24*60*60)
195
196 /* Allocation roundup. */
197 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
198
199 #endif