Enumprinters level 1: reply *exactly* like an NT server
[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 /* max number of directories open at once */
33 /* note that with the new directory code this no longer requires a
34    file handle per directory, but large numbers do use more memory */
35 #define MAX_OPEN_DIRECTORIES 256
36
37 /* max number of directory handles */
38 /* As this now uses the bitmap code this can be
39    quite large. */
40 #define MAX_DIRECTORY_HANDLES 2048
41
42 /* maximum number of file caches per smbd */
43 #define MAX_WRITE_CACHES 10
44
45 /* define what facility to use for syslog */
46 #ifndef SYSLOG_FACILITY
47 #define SYSLOG_FACILITY LOG_DAEMON
48 #endif
49
50 /* Default size of shared memory used for share mode locking */
51 #ifndef SHMEM_SIZE
52 #define SHMEM_SIZE (1024*1024)
53 #endif
54
55 /* 
56  * Default number of maximum open files per smbd. This is
57  * also limited by the maximum available file descriptors
58  * per process and can also be set in smb.conf as "max open files"
59  * in the [global] section.
60  */
61
62 #ifndef MAX_OPEN_FILES
63 #define MAX_OPEN_FILES 10000
64 #endif
65  
66 /* the max number of simultanous connections to the server by all clients */
67 #define MAXSTATUS 100000
68
69 #define WORDMAX 0xFFFF
70
71 /* the maximum password length before we declare a likely attack */
72 #define MAX_PASS_LEN 200
73
74 /* separators for lists */
75 #define LIST_SEP " \t,;:\n\r"
76
77 /* wchar separators for lists */
78 #define LIST_SEP_W wchar_list_sep
79
80 #ifndef LOCKDIR
81 /* this should have been set in the Makefile */
82 #define LOCKDIR "/tmp/samba"
83 #endif
84
85 /* this is where browse lists are kept in the lock dir */
86 #define SERVER_LIST "browse.dat"
87
88 /* shall guest entries in printer queues get changed to user entries,
89    so they can be deleted using the windows print manager? */
90 #define LPQ_GUEST_TO_USER
91
92 /* shall filenames with illegal chars in them get mangled in long
93    filename listings? */
94 #define MANGLE_LONG_FILENAMES 
95
96 /* define this if you want to stop spoofing with .. and soft links
97    NOTE: This also slows down the server considerably */
98 #define REDUCE_PATHS
99
100 /* the size of the directory cache */
101 #define DIRCACHESIZE 20
102
103 /* what default type of filesystem do we want this to show up as in a
104    NT file manager window? */
105 #define FSTYPE_STRING "NTFS"
106
107 /* the default guest account - normally set in the Makefile or smb.conf */
108 #ifndef GUEST_ACCOUNT
109 #define GUEST_ACCOUNT "nobody"
110 #endif
111
112 /* the default pager to use for the client "more" command. Users can
113    override this with the PAGER environment variable */
114 #ifndef PAGER
115 #define PAGER "more"
116 #endif
117
118 /* the size of the uid cache used to reduce valid user checks */
119 #define UID_CACHE_SIZE 4
120
121 /* if mmap is enabled, then this is the maximum size of file to use
122    the mmap code on. We don't want to mmap huge files as virtual
123    address spaces are limited */
124 #define MAX_MMAP_SIZE (100*0x100000)
125
126 /* the following control timings of various actions. Don't change 
127    them unless you know what you are doing. These are all in seconds */
128 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
129 #define SMBD_RELOAD_CHECK (180)
130 #define IDLE_CLOSED_TIMEOUT (60)
131 #define DPTR_IDLE_TIMEOUT (120)
132 #define SMBD_SELECT_TIMEOUT (60)
133 #define SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS (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 #define NMBD_INTERFACES_RELOAD (120)
141 #define NMBD_UNEXPECTED_TIMEOUT (15)
142
143 /* the following are in milliseconds */
144 #define LOCK_RETRY_TIMEOUT (100)
145
146 /* do you want to dump core (carefully!) when an internal error is
147    encountered? Samba will be careful to make the core file only
148    accessible to root */
149 #define DUMP_CORE 1
150
151 #define SMB_ALIGNMENT 1
152
153
154 /* shall we support browse requests via a FIFO to nmbd? */
155 #define ENABLE_FIFO 1
156
157 /* how long (in miliseconds) to wait for a socket connect to happen */
158 #define LONG_CONNECT_TIMEOUT 30000
159 #define SHORT_CONNECT_TIMEOUT 5000
160
161 /* the default netbios keepalive timeout */
162 #define DEFAULT_KEEPALIVE 300
163
164 /* the directory to sit in when idle */
165 /* #define IDLE_DIR "/" */
166
167 /* Timout (in seconds) to wait for an oplock break
168    message to return from the client. */
169
170 #define OPLOCK_BREAK_TIMEOUT 30
171
172 /* Timout (in seconds) to add to the oplock break timeout
173    to wait for the smbd to smbd message to return. */
174
175 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
176
177 /* the read preciction code has been disabled until some problems with
178    it are worked out */
179 #define USE_READ_PREDICTION 0
180
181 /* name of directory that netatalk uses to store macintosh resource forks */
182 #define APPLEDOUBLE ".AppleDouble/"
183
184 /*
185  * Default passwd chat script.
186  */
187
188 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
189
190 /* Minimum length of allowed password when changing UNIX password. */
191 #define MINPASSWDLENGTH 5
192
193 #endif