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