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