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