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