Added the APPLEDOUBLE macro for the name of the directory containing
[kai/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 /* 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"
19
20 /* This defines the section name in the configuration file that will
21    refer to the special "homes" service */
22 #define HOMES_NAME "homes"
23
24 /* This defines the section name in the configuration file that will
25    refer to the special "printers" service */
26 #define PRINTERS_NAME "printers"
27
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
31
32
33 /* define what facility to use for syslog */
34 #ifndef SYSLOG_FACILITY
35 #define SYSLOG_FACILITY LOG_DAEMON
36 #endif
37
38 /* set these to define the limits of the server. NOTE These are on a
39    per-client basis. Thus any one machine can't connect to more than
40    MAX_CONNECTIONS services, but any number of machines may connect at
41    one time. */
42 #define MAX_CONNECTIONS 127
43 #define MAX_OPEN_FILES 100
44
45 /* max number of directories open at once */
46 /* note that with the new directory code this no longer requires a
47    file handle per directory, but large numbers do use more memory */
48 #define MAX_OPEN_DIRECTORIES 64
49
50 #define MAX_FNUMS (MAX_OPEN_FILES+MAX_OPEN_DIRECTORIES)
51
52 /* Default size of shared memory used for share mode locking */
53 #ifndef SHMEM_SIZE
54 #define SHMEM_SIZE (1024*(MAX_OPEN_FILES+MAX_OPEN_DIRECTORIES))
55 #endif
56
57 /* the max number of simultanous connections to the server by all clients */
58 #define MAXSTATUS 100000
59
60 #define WORDMAX 0xFFFF
61
62 /* the maximum password length before we declare a likely attack */
63 #define MAX_PASS_LEN 200
64
65 /* separators for lists */
66 #define LIST_SEP " \t,;:\n\r"
67
68 #ifndef LOCKDIR
69 /* this should have been set in the Makefile */
70 #define LOCKDIR "/tmp/samba"
71 #endif
72
73 /* this is where browse lists are kept in the lock dir */
74 #define SERVER_LIST "browse.dat"
75
76 /* shall guest entries in printer queues get changed to user entries,
77    so they can be deleted using the windows print manager? */
78 #define LPQ_GUEST_TO_USER
79
80 /* shall filenames with illegal chars in them get mangled in long
81    filename listings? */
82 #define MANGLE_LONG_FILENAMES 
83
84 /* define this if you want to stop spoofing with .. and soft links
85    NOTE: This also slows down the server considerably */
86 #define REDUCE_PATHS
87
88 /* the size of the directory cache */
89 #define DIRCACHESIZE 20
90
91 /* what type of filesystem do we want this to show up as in a NT file
92    manager window? */
93 #define FSTYPE_STRING "Samba"
94
95 /* the default guest account - normally set in the Makefile or smb.conf */
96 #ifndef GUEST_ACCOUNT
97 #define GUEST_ACCOUNT "nobody"
98 #endif
99
100 /* do you want smbd to send a 1 byte packet to nmbd to trigger it to start 
101    when smbd starts? */
102 #ifndef PRIME_NMBD
103 #define PRIME_NMBD 1
104 #endif
105
106 /* do you want session setups at user level security with a invalid
107    password to be rejected or allowed in as guest? WinNT rejects them
108    but it can be a pain as it means "net view" needs to use a password 
109
110    You have 3 choices:
111
112    GUEST_SESSSETUP = 0 means session setups with an invalid password
113    are rejected.
114
115    GUEST_SESSSETUP = 1 means session setups with an invalid password
116    are rejected, unless the username does not exist, in which case it
117    is treated as a guest login
118
119    GUEST_SESSSETUP = 2 means session setups with an invalid password
120    are treated as a guest login
121
122    Note that GUEST_SESSSETUP only has an effect in user or server
123    level security.
124    */
125 #ifndef GUEST_SESSSETUP
126 #define GUEST_SESSSETUP 0
127 #endif
128
129 /* the default pager to use for the client "more" command. Users can
130    override this with the PAGER environment variable */
131 #ifndef PAGER
132 #define PAGER "more"
133 #endif
134
135 /* the size of the uid cache used to reduce valid user checks */
136 #define UID_CACHE_SIZE 4
137
138 /* the following control timings of various actions. Don't change 
139    them unless you know what you are doing. These are all in seconds */
140 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
141 #define SMBD_RELOAD_CHECK (60)
142 #define IDLE_CLOSED_TIMEOUT (60)
143 #define DPTR_IDLE_TIMEOUT (120)
144 #define SMBD_SELECT_LOOP (10)
145 #define NMBD_SELECT_LOOP (10)
146 #define BROWSE_INTERVAL (60)
147 #define REGISTRATION_INTERVAL (10*60)
148 #define NMBD_INETD_TIMEOUT (120)
149 #define NMBD_MAX_TTL (24*60*60)
150 #define LPQ_LOCK_TIMEOUT (5)
151
152 /* the following are in milliseconds */
153 #define LOCK_RETRY_TIMEOUT (100)
154
155 /* do you want to dump core (carefully!) when an internal error is
156    encountered? Samba will be careful to make the core file only
157    accessible to root */
158 #define DUMP_CORE 1
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 /* name of directory that netatalk uses to store macintosh resource forks */
191 #define APPLEDOUBLE ".AppleDouble/"
192
193 #endif