1 /* Copyright (C) 1995-1998 Samba-Team */
2 /* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
4 /* local definitions for file server */
8 /* The default workgroup - usually overridden in smb.conf */
10 #define WORKGROUP "WORKGROUP"
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
18 #ifndef MAX_DEBUG_LEVEL
19 #define MAX_DEBUG_LEVEL 1000
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"
29 /* This defines the section name in the configuration file that will
30 refer to the special "homes" service */
31 #define HOMES_NAME "homes"
33 /* This defines the section name in the configuration file that will
34 refer to the special "printers" service */
35 #define PRINTERS_NAME "printers"
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
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
46 /* max number of directory handles */
47 /* As this now uses the bitmap code this can be
49 #define MAX_DIRECTORY_HANDLES 2048
51 /* maximum number of file caches per smbd */
52 #define MAX_WRITE_CACHES 10
54 /* define what facility to use for syslog */
55 #ifndef SYSLOG_FACILITY
56 #define SYSLOG_FACILITY LOG_DAEMON
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.
66 #ifndef MAX_OPEN_FILES
67 #define MAX_OPEN_FILES 10000
70 /* the max number of simultanous connections to the server by all clients */
71 #define MAXSTATUS 100000
73 #define WORDMAX 0xFFFF
75 /* the maximum password length before we declare a likely attack */
76 #define MAX_PASS_LEN 200
78 /* separators for lists */
79 #define LIST_SEP " \t,;:\n\r"
81 /* wchar separators for lists */
82 #define LIST_SEP_W wchar_list_sep
84 /* this is where browse lists are kept in the lock dir */
85 #define SERVER_LIST "browse.dat"
87 /* shall filenames with illegal chars in them get mangled in long
89 #define MANGLE_LONG_FILENAMES
91 /* define this if you want to stop spoofing with .. and soft links
92 NOTE: This also slows down the server considerably */
95 /* the size of the directory cache */
96 #define DIRCACHESIZE 20
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"
102 /* the default guest account - normally set in the Makefile or smb.conf */
103 #ifndef GUEST_ACCOUNT
104 #define GUEST_ACCOUNT "nobody"
107 /* user to test password server with as invalid in security=server mode. */
108 #ifndef INVALID_USER_PREFIX
109 #define INVALID_USER_PREFIX "sambatest"
112 /* the default pager to use for the client "more" command. Users can
113 override this with the PAGER environment variable */
118 /* the size of the uid cache used to reduce valid user checks */
119 #define UID_CACHE_SIZE 4
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)
138 /* the following are in milliseconds */
139 #define LOCK_RETRY_TIMEOUT (100)
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 */
146 /* shall we support browse requests via a FIFO to nmbd? */
147 #define ENABLE_FIFO 1
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
153 /* the default netbios keepalive timeout */
154 #define DEFAULT_KEEPALIVE 300
156 /* the directory to sit in when idle */
157 /* #define IDLE_DIR "/" */
159 /* Timout (in seconds) to wait for an oplock break
160 message to return from the client. */
162 #define OPLOCK_BREAK_TIMEOUT 30
164 /* Timout (in seconds) to add to the oplock break timeout
165 to wait for the smbd to smbd message to return. */
167 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
169 /* the read preciction code has been disabled until some problems with
171 #define USE_READ_PREDICTION 0
173 /* name of directory that netatalk uses to store macintosh resource forks */
174 #define APPLEDOUBLE ".AppleDouble/"
177 * Default passwd chat script.
180 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
182 /* Minimum length of allowed password when changing UNIX password. */
183 #define MINPASSWDLENGTH 5
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
189 #ifndef SESSION_TEMPLATE
190 #define SESSION_TEMPLATE "smb/%d"
193 /* the maximum age in seconds of a password. Should be a lp_ parameter */
194 #define MAX_PASSWORD_AGE (21*24*60*60)
196 /* Allocation roundup. */
197 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000