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