0a369d80e29cbb43126041ba6024ac422ccfe7f6
[ira/wip.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 /* This defines the section name in the configuration file that will contain */
9 /* global parameters - that is, parameters relating to the whole server, not */
10 /* just services. This name is then reserved, and may not be used as a       */
11 /* a service name. It will default to "global" if not defined here.          */
12 #define GLOBAL_NAME "global"
13 #define GLOBAL_NAME2 "globals"
14
15 /* This defines the section name in the configuration file that will
16    refer to the special "homes" service */
17 #define HOMES_NAME "homes"
18
19 /* This defines the section name in the configuration file that will
20    refer to the special "printers" service */
21 #define PRINTERS_NAME "printers"
22
23 /* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this       */
24 /* to a maximum of 8 if old smb clients break because of long printer names. */
25 #define MAXPRINTERLEN 15
26
27
28 /* define what facility to use for syslog */
29 #ifndef SYSLOG_FACILITY
30 #define SYSLOG_FACILITY LOG_DAEMON
31 #endif
32
33 /* set these to define the limits of the server. NOTE These are on a
34    per-client basis. Thus any one machine can't connect to more than
35    MAX_CONNECTIONS services, but any number of machines may connect at
36    one time. */
37 #define MAX_CONNECTIONS 127
38 #define MAX_OPEN_FILES 100
39
40 /* max number of directories open at once */
41 /* note that with the new directory code this no longer requires a
42    file handle per directory, but large numbers do use more memory */
43 #define MAX_OPEN_DIRECTORIES 64
44
45 #define MAX_FNUMS (MAX_OPEN_FILES+MAX_OPEN_DIRECTORIES)
46
47 /* Default size of shared memory used for share mode locking */
48 #ifndef SHMEM_SIZE
49 #define SHMEM_SIZE (1024*(MAX_OPEN_FILES+MAX_OPEN_DIRECTORIES))
50 #endif
51
52 /* the max number of simultanous connections to the server by all clients */
53 #define MAXSTATUS 100000
54
55 #define WORDMAX 0xFFFF
56
57 /* the maximum password length before we declare a likely attack */
58 #define MAX_PASS_LEN 200
59
60 /* separators for lists */
61 #define LIST_SEP " \t,;:\n\r"
62
63 #ifndef LOCKDIR
64 /* this should have been set in the Makefile */
65 #define LOCKDIR "/tmp/samba"
66 #endif
67
68 /* this is where browse lists are kept in the lock dir */
69 #define SERVER_LIST "browse.dat"
70
71 /* shall guest entries in printer queues get changed to user entries,
72    so they can be deleted using the windows print manager? */
73 #define LPQ_GUEST_TO_USER
74
75 /* shall filenames with illegal chars in them get mangled in long
76    filename listings? */
77 #define MANGLE_LONG_FILENAMES 
78
79 /* define this if you want to stop spoofing with .. and soft links
80    NOTE: This also slows down the server considerably */
81 #define REDUCE_PATHS
82
83 /* the size of the directory cache */
84 #define DIRCACHESIZE 20
85
86 /* what type of filesystem do we want this to show up as in a NT file
87    manager window? */
88 #define FSTYPE_STRING "Samba"
89
90 /* the default guest account - normally set in the Makefile or smb.conf */
91 #ifndef GUEST_ACCOUNT
92 #define GUEST_ACCOUNT "nobody"
93 #endif
94
95 /* do you want smbd to send a 1 byte packet to nmbd to trigger it to start 
96    when smbd starts? */
97 #ifndef PRIME_NMBD
98 #define PRIME_NMBD 1
99 #endif
100
101 /* do you want session setups at user level security with a invalid
102    password to be rejected or allowed in as guest? WinNT rejects them
103    but it can be a pain as it means "net view" needs to use a password 
104
105    You have 3 choices:
106
107    GUEST_SESSSETUP = 0 means session setups with an invalid password
108    are rejected.
109
110    GUEST_SESSSETUP = 1 means session setups with an invalid password
111    are rejected, unless the username does not exist, in which case it
112    is treated as a guest login
113
114    GUEST_SESSSETUP = 2 means session setups with an invalid password
115    are treated as a guest login
116
117    Note that GUEST_SESSSETUP only has an effect in user or server
118    level security.
119    */
120 #ifndef GUEST_SESSSETUP
121 #define GUEST_SESSSETUP 0
122 #endif
123
124 /* the default pager to use for the client "more" command. Users can
125    override this with the PAGER environment variable */
126 #ifndef PAGER
127 #define PAGER "more"
128 #endif
129
130 /* the size of the uid cache used to reduce valid user checks */
131 #define UID_CACHE_SIZE 4
132
133 /* the following control timings of various actions. Don't change 
134    them unless you know what you are doing. These are all in seconds */
135 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
136 #define SMBD_RELOAD_CHECK (60)
137 #define IDLE_CLOSED_TIMEOUT (60)
138 #define DPTR_IDLE_TIMEOUT (120)
139 #define SMBD_SELECT_LOOP (10)
140 #define NMBD_SELECT_LOOP (10)
141 #define BROWSE_INTERVAL (60)
142 #define REGISTRATION_INTERVAL (10*60)
143 #define NMBD_INETD_TIMEOUT (120)
144 #define NMBD_MAX_TTL (24*60*60)
145 #define LPQ_LOCK_TIMEOUT (5)
146
147 /* the following are in milliseconds */
148 #define LOCK_RETRY_TIMEOUT (100)
149
150 /* do you want to dump core (carefully!) when an internal error is
151    encountered? Samba will be careful to make the core file only
152    accessible to root */
153 #define DUMP_CORE 1
154
155 /* what is the longest significant password available on your system? 
156  Knowing this speeds up password searches a lot */
157 #ifndef PASSWORD_LENGTH
158 #define PASSWORD_LENGTH 8
159 #endif
160
161 #define SMB_ALIGNMENT 1
162
163
164 /* shall we support browse requests via a FIFO to nmbd? */
165 #define ENABLE_FIFO 1
166
167 /* how long to wait for a socket connect to happen */
168 #define LONG_CONNECT_TIMEOUT 30
169 #define SHORT_CONNECT_TIMEOUT 5
170
171 /* the default netbios keepalive timeout */
172 #define DEFAULT_KEEPALIVE 300
173
174 /* the directory to sit in when idle */
175 /* #define IDLE_DIR "/" */
176
177 /* Timout (in seconds) to wait for an oplock break
178    message to return from the client. */
179
180 #define OPLOCK_BREAK_TIMEOUT 30
181
182 /* Timout (in seconds) to add to the oplock break timeout
183    to wait for the smbd to smbd message to return. */
184
185 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
186
187 /* the read preciction code has been disabled until some problems with
188    it are worked out */
189 #define USE_READ_PREDICTION 0
190
191 #endif