~ubuntu-branches/ubuntu/lucid/samba/lucid-proposed

« back to all changes in this revision

Viewing changes to .pc/smbclient-pager.patch/source3/include/local.h

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-28 05:02:32 UTC
  • mfrom: (0.34.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091228050232-jdd4xy3otxp71kdt
Tags: 2:3.4.3-2ubuntu1
* Merge from debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - Add "(Samba, Ubuntu)" to server string.
    - Comment out the default [homes] share, and add a comment about "valid users = %s" 
      to show users how to restrict access to \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are allowed to create
      public shares in additon to authenticated ones.
    - add map to guest = Bad user, maps bad username to gues access.
  + debian/samba-common.conf:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libswbclient0 replace/conflickt with hardy's likewise-open.
    - Don't build against ctdb.
    - Build-depend on libreadline-dev instead of libreadline5-dev.
  + debian/rules:
    - Enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
/* the maximum debug level to compile into the code. This assumes a good 
 
14
   optimising compiler that can remove unused code 
 
15
   for embedded or low-memory systems set this to a value like 2 to get
 
16
   only important messages. This gives *much* smaller binaries
 
17
*/
 
18
#ifndef MAX_DEBUG_LEVEL
 
19
#define MAX_DEBUG_LEVEL 1000
 
20
#endif
 
21
 
 
22
/* This defines the section name in the configuration file that will contain */
 
23
/* global parameters - that is, parameters relating to the whole server, not */
 
24
/* just services. This name is then reserved, and may not be used as a       */
 
25
/* a service name. It will default to "global" if not defined here.          */
 
26
#define GLOBAL_NAME "global"
 
27
#define GLOBAL_NAME2 "globals"
 
28
 
 
29
/* This defines the section name in the configuration file that will
 
30
   refer to the special "homes" service */
 
31
#define HOMES_NAME "homes"
 
32
 
 
33
/* This defines the section name in the configuration file that will
 
34
   refer to the special "printers" service */
 
35
#define PRINTERS_NAME "printers"
 
36
 
 
37
/* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this       */
 
38
/* to a maximum of 8 if old smb clients break because of long printer names. */
 
39
#define MAXPRINTERLEN 15
 
40
 
 
41
/* max number of directories open at once */
 
42
/* note that with the new directory code this no longer requires a
 
43
   file handle per directory, but large numbers do use more memory */
 
44
#define MAX_OPEN_DIRECTORIES 256
 
45
 
 
46
/* max number of directory handles */
 
47
/* As this now uses the bitmap code this can be
 
48
   quite large. */
 
49
#define MAX_DIRECTORY_HANDLES 2048
 
50
 
 
51
/* maximum number of file caches per smbd */
 
52
#define MAX_WRITE_CACHES 10
 
53
 
 
54
/* define what facility to use for syslog */
 
55
#ifndef SYSLOG_FACILITY
 
56
#define SYSLOG_FACILITY LOG_DAEMON
 
57
#endif
 
58
 
 
59
/* 
 
60
 * Default number of maximum open files per smbd. This is
 
61
 * also limited by the maximum available file descriptors
 
62
 * per process and can also be set in smb.conf as "max open files"
 
63
 * in the [global] section.
 
64
 */
 
65
 
 
66
#ifndef MAX_OPEN_FILES
 
67
#define MAX_OPEN_FILES 10000
 
68
#endif
 
69
 
 
70
#define WORDMAX 0xFFFF
 
71
 
 
72
/* the maximum password length before we declare a likely attack */
 
73
#define MAX_PASS_LEN 200
 
74
 
 
75
/* separators for lists */
 
76
#define LIST_SEP " \t,;\n\r"
 
77
 
 
78
/* wchar separators for lists */
 
79
#define LIST_SEP_W wchar_list_sep
 
80
 
 
81
/* this is where browse lists are kept in the lock dir */
 
82
#define SERVER_LIST "browse.dat"
 
83
 
 
84
/* shall filenames with illegal chars in them get mangled in long
 
85
   filename listings? */
 
86
#define MANGLE_LONG_FILENAMES 
 
87
 
 
88
/* define this if you want to stop spoofing with .. and soft links
 
89
   NOTE: This also slows down the server considerably */
 
90
#define REDUCE_PATHS
 
91
 
 
92
/* the size of the directory cache */
 
93
#define DIRCACHESIZE 20
 
94
 
 
95
/* what default type of filesystem do we want this to show up as in a
 
96
   NT file manager window? */
 
97
#define FSTYPE_STRING "NTFS"
 
98
 
 
99
/* the default guest account - normally set in the Makefile or smb.conf */
 
100
#ifndef GUEST_ACCOUNT
 
101
#define GUEST_ACCOUNT "nobody"
 
102
#endif
 
103
 
 
104
/* user to test password server with as invalid in security=server mode. */
 
105
#ifndef INVALID_USER_PREFIX
 
106
#define INVALID_USER_PREFIX "sambatest"
 
107
#endif
 
108
 
 
109
/* the default pager to use for the client "more" command. Users can
 
110
   override this with the PAGER environment variable */
 
111
#ifndef PAGER
 
112
#define PAGER "more"
 
113
#endif
 
114
 
 
115
/* the size of the uid cache used to reduce valid user checks */
 
116
#define VUID_CACHE_SIZE 32
 
117
 
 
118
/* the following control timings of various actions. Don't change 
 
119
   them unless you know what you are doing. These are all in seconds */
 
120
#define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
 
121
#define SMBD_RELOAD_CHECK (180)
 
122
#define IDLE_CLOSED_TIMEOUT (60)
 
123
#define DPTR_IDLE_TIMEOUT (120)
 
124
#define SMBD_SELECT_TIMEOUT (60)
 
125
#define NMBD_SELECT_LOOP (10)
 
126
#define BROWSE_INTERVAL (60)
 
127
#define REGISTRATION_INTERVAL (10*60)
 
128
#define NMBD_INETD_TIMEOUT (120)
 
129
#define NMBD_MAX_TTL (24*60*60)
 
130
#define LPQ_LOCK_TIMEOUT (5)
 
131
#define NMBD_INTERFACES_RELOAD (120)
 
132
#define NMBD_UNEXPECTED_TIMEOUT (15)
 
133
 
 
134
/* the following are in milliseconds */
 
135
#define LOCK_RETRY_TIMEOUT (100)
 
136
 
 
137
/* do you want to dump core (carefully!) when an internal error is
 
138
   encountered? Samba will be careful to make the core file only
 
139
   accessible to root */
 
140
#define DUMP_CORE 1
 
141
 
 
142
/* shall we support browse requests via a FIFO to nmbd? */
 
143
#define ENABLE_FIFO 1
 
144
 
 
145
/* how long (in miliseconds) to wait for a socket connect to happen */
 
146
#define LONG_CONNECT_TIMEOUT 30000
 
147
#define SHORT_CONNECT_TIMEOUT 5000
 
148
 
 
149
/* the default netbios keepalive timeout */
 
150
#define DEFAULT_KEEPALIVE 300
 
151
 
 
152
/* the directory to sit in when idle */
 
153
/* #define IDLE_DIR "/" */
 
154
 
 
155
/* Timout (in seconds) to wait for an oplock break
 
156
   message to return from the client. */
 
157
 
 
158
#define OPLOCK_BREAK_TIMEOUT 30
 
159
 
 
160
/* Timout (in seconds) to add to the oplock break timeout
 
161
   to wait for the smbd to smbd message to return. */
 
162
 
 
163
#define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
 
164
 
 
165
/* the read preciction code has been disabled until some problems with
 
166
   it are worked out */
 
167
#define USE_READ_PREDICTION 0
 
168
 
 
169
/*
 
170
 * Default passwd chat script.
 
171
 */
 
172
 
 
173
#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
 
174
 
 
175
/* Minimum length of allowed password when changing UNIX password. */
 
176
#define MINPASSWDLENGTH 5
 
177
 
 
178
/* maximum ID number used for session control. This cannot be larger
 
179
   than 62*62 for the current code */
 
180
#define MAX_SESSION_ID 3000
 
181
 
 
182
/* For the benifit of PAM and the 'session exec' scripts, we fake up a terminal
 
183
   name. This can be in one of two forms:  The first for systems not using
 
184
   utmp (and therefore not constrained as to length or the need for a number
 
185
   < 3000 or so) and the second for systems with this 'well behaved terminal
 
186
   like name' constraint.
 
187
*/
 
188
 
 
189
#ifndef SESSION_TEMPLATE
 
190
/* Paramaters are 'pid' and 'vuid' */
 
191
#define SESSION_TEMPLATE "smb/%lu/%d"
 
192
#endif
 
193
 
 
194
#ifndef SESSION_UTMP_TEMPLATE
 
195
#define SESSION_UTMP_TEMPLATE "smb/%d"
 
196
#endif
 
197
 
 
198
/* the maximum age in seconds of a password. Should be a lp_ parameter */
 
199
#define MAX_PASSWORD_AGE (21*24*60*60)
 
200
 
 
201
/* Default allocation roundup. */
 
202
#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
 
203
 
 
204
/* shall we deny oplocks to clients that get timeouts? */
 
205
#define FASCIST_OPLOCK_BACKOFF 1
 
206
 
 
207
/* this enables the "rabbit pellet" fix for SMBwritebraw */
 
208
#define RABBIT_PELLET_FIX 1
 
209
 
 
210
/* Max number of jobs per print queue. */
 
211
#define PRINT_MAX_JOBID 10000
 
212
 
 
213
/* Max number of open RPC pipes. */
 
214
#define MAX_OPEN_PIPES 2048
 
215
 
 
216
/* Tuning for server auth mutex. */
 
217
#define CLI_AUTH_TIMEOUT 5000 /* In milli-seconds. */
 
218
#define NUM_CLI_AUTH_CONNECT_RETRIES 3
 
219
/* Number in seconds to wait for the mutex. This must be less than 30 seconds. */
 
220
#define SERVER_MUTEX_WAIT_TIME ( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)
 
221
/* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */
 
222
#define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
 
223
 
 
224
/* Max number of simultaneous winbindd socket connections. */
 
225
#define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200
 
226
 
 
227
/* Buffer size to use when printing backtraces */
 
228
#define BACKTRACE_STACK_SIZE 64
 
229
 
 
230
/* size of listen() backlog in smbd */
 
231
#define SMBD_LISTEN_BACKLOG 50
 
232
 
 
233
/* Number of microseconds to wait before a sharing violation. */
 
234
#define SHARING_VIOLATION_USEC_WAIT 950000
 
235
 
 
236
/* Number of microseconds to wait before a updating the write time (2 secs). */
 
237
#define WRITE_TIME_UPDATE_USEC_DELAY 2000000
 
238
 
 
239
#define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */
 
240
 
 
241
/* tdb hash size for the open database. */
 
242
#define SMB_OPEN_DATABASE_TDB_HASH_SIZE 10007
 
243
 
 
244
/* Characters we disallow in sharenames. */
 
245
#define INVALID_SHARENAME_CHARS "%<>*?|/\\+=;:\","
 
246
 
 
247
/* Seconds between connection attempts to a remote server. */
 
248
#define FAILED_CONNECTION_CACHE_TIMEOUT 30
 
249
 
 
250
/* Default hash size for the winbindd cache. */
 
251
#define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000
 
252
 
 
253
/* Windows minimum lock resolution timeout in ms */
 
254
#define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
 
255
 
 
256
/* Maximum size of RPC data we will accept for one call. */
 
257
#define MAX_RPC_DATA_SIZE (15*1024*1024)
 
258
 
 
259
#endif