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