1998-03-21 06:03:59 +03:00
/* Copyright (C) 1995-1998 Samba-Team */
/* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
1996-05-04 11:50:46 +04:00
/* local definitions for file server */
# ifndef _LOCAL_H
# define _LOCAL_H
1998-03-21 06:03:59 +03:00
/* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this */
/* to a maximum of 8 if old smb clients break because of long printer names. */
# define MAXPRINTERLEN 15
2019-07-09 01:06:30 +03:00
/* max number of SMB1 directory handles */
1999-12-13 16:27:58 +03:00
/* As this now uses the bitmap code this can be
quite large . */
# define MAX_DIRECTORY_HANDLES 2048
/* maximum number of file caches per smbd */
# define MAX_WRITE_CACHES 10
1998-03-21 06:03:59 +03:00
2009-12-02 21:01:14 +03:00
/*
* Fudgefactor required for open tdb ' s , etc .
*/
# ifndef MAX_OPEN_FUDGEFACTOR
2014-01-06 07:51:58 +04:00
# define MAX_OPEN_FUDGEFACTOR 40
2009-12-02 21:01:14 +03:00
# endif
/*
* Minimum number of open files needed for Windows7 to
* work correctly . A little conservative but better that
* than run out of fd ' s .
*/
# ifndef MIN_OPEN_FILES_WINDOWS
2009-12-16 21:19:19 +03:00
# define MIN_OPEN_FILES_WINDOWS 16384
# endif
/*
* Default number of maximum open files per smbd . This is
* also limited by the maximum available file descriptors
* per process and can also be set in smb . conf as " max open files "
* in the [ global ] section .
*/
# ifndef MAX_OPEN_FILES
# define MAX_OPEN_FILES (MIN_OPEN_FILES_WINDOWS + MAX_OPEN_FUDGEFACTOR)
2009-12-02 21:01:14 +03:00
# endif
1996-05-04 11:50:46 +04:00
# define WORDMAX 0xFFFF
1997-09-26 22:55:29 +04:00
/* the maximum password length before we declare a likely attack */
1997-10-09 10:36:04 +04:00
# define MAX_PASS_LEN 200
1996-05-04 11:50:46 +04:00
/* separators for lists */
2002-07-15 14:35:28 +04:00
# define LIST_SEP " \t,;\n\r"
1996-05-04 11:50:46 +04:00
1999-12-29 05:00:38 +03:00
/* wchar separators for lists */
# define LIST_SEP_W wchar_list_sep
1996-05-04 11:50:46 +04:00
/* this is where browse lists are kept in the lock dir */
# define SERVER_LIST "browse.dat"
/* shall filenames with illegal chars in them get mangled in long
filename listings ? */
# define MANGLE_LONG_FILENAMES
/* define this if you want to stop spoofing with .. and soft links
NOTE : This also slows down the server considerably */
# define REDUCE_PATHS
/* the size of the directory cache */
# define DIRCACHESIZE 20
1998-09-20 19:39:12 +04:00
/* what default type of filesystem do we want this to show up as in a
NT file manager window ? */
1998-09-26 14:31:40 +04:00
# define FSTYPE_STRING "NTFS"
1997-12-03 02:28:14 +03:00
2001-05-07 00:56:14 +04:00
/* user to test password server with as invalid in security=server mode. */
# ifndef INVALID_USER_PREFIX
# define INVALID_USER_PREFIX "sambatest"
# endif
1996-05-04 11:50:46 +04:00
/* the default pager to use for the client "more" command. Users can
override this with the PAGER environment variable */
# ifndef PAGER
# define PAGER "more"
# endif
/* the size of the uid cache used to reduce valid user checks */
2002-09-25 19:19:00 +04:00
# define VUID_CACHE_SIZE 32
1996-05-04 11:50:46 +04:00
/* the following control timings of various actions. Don't change
them unless you know what you are doing . These are all in seconds */
1999-12-13 16:27:58 +03:00
# define SMBD_RELOAD_CHECK (180)
1996-05-04 11:50:46 +04:00
# define IDLE_CLOSED_TIMEOUT (60)
1999-12-13 16:27:58 +03:00
# define SMBD_SELECT_TIMEOUT (60)
1996-10-07 05:56:21 +04:00
# define NMBD_SELECT_LOOP (10)
1996-05-04 11:50:46 +04:00
# define BROWSE_INTERVAL (60)
# define REGISTRATION_INTERVAL (10*60)
# define NMBD_INETD_TIMEOUT (120)
# define NMBD_MAX_TTL (24*60*60)
# define LPQ_LOCK_TIMEOUT (5)
1999-12-13 16:27:58 +03:00
# define NMBD_INTERFACES_RELOAD (120)
2000-01-03 06:17:16 +03:00
# define NMBD_UNEXPECTED_TIMEOUT (15)
2010-12-23 14:14:21 +03:00
# define SMBD_HOUSEKEEPING_INTERVAL SMBD_SELECT_TIMEOUT
1996-05-04 11:50:46 +04:00
/* the following are in milliseconds */
# define LOCK_RETRY_TIMEOUT (100)
/* do you want to dump core (carefully!) when an internal error is
encountered ? Samba will be careful to make the core file only
accessible to root */
# define DUMP_CORE 1
/* shall we support browse requests via a FIFO to nmbd? */
# define ENABLE_FIFO 1
1999-12-13 16:27:58 +03:00
/* how long (in miliseconds) to wait for a socket connect to happen */
# define LONG_CONNECT_TIMEOUT 30000
# define SHORT_CONNECT_TIMEOUT 5000
1998-11-09 07:17:11 +03:00
1998-03-16 10:23:51 +03:00
/* the default netbios keepalive timeout */
# define DEFAULT_KEEPALIVE 300
1996-10-04 13:31:07 +04:00
/* the directory to sit in when idle */
1996-10-07 19:04:48 +04:00
/* #define IDLE_DIR "/" */
1996-10-04 13:31:07 +04:00
1997-10-09 22:40:52 +04:00
/* Timout (in seconds) to wait for an oplock break
1997-11-06 22:11:16 +03:00
message to return from the client . */
1997-09-30 06:38:19 +04:00
1997-10-02 03:32:22 +04:00
# define OPLOCK_BREAK_TIMEOUT 30
1997-09-30 06:38:19 +04:00
1997-11-06 22:11:16 +03:00
/* Timout (in seconds) to add to the oplock break timeout
to wait for the smbd to smbd message to return . */
# define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
1997-10-27 16:38:07 +03:00
/* the read preciction code has been disabled until some problems with
it are worked out */
# define USE_READ_PREDICTION 0
1999-12-13 16:27:58 +03:00
/* Minimum length of allowed password when changing UNIX password. */
# define MINPASSWDLENGTH 5
2001-10-01 14:54:11 +04:00
/* the maximum age in seconds of a password. Should be a lp_ parameter */
# define MAX_PASSWORD_AGE (21*24*60*60)
2002-04-11 06:20:56 +04:00
/* shall we deny oplocks to clients that get timeouts? */
# define FASCIST_OPLOCK_BACKOFF 1
/* this enables the "rabbit pellet" fix for SMBwritebraw */
# define RABBIT_PELLET_FIX 1
2002-10-23 02:17:29 +04:00
/* Max number of open RPC pipes. */
# define MAX_OPEN_PIPES 2048
2003-01-16 23:08:26 +03:00
/* Tuning for server auth mutex. */
# define CLI_AUTH_TIMEOUT 5000 /* In milli-seconds. */
# define NUM_CLI_AUTH_CONNECT_RETRIES 3
/* Number in seconds to wait for the mutex. This must be less than 30 seconds. */
# define SERVER_MUTEX_WAIT_TIME ( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT) / 1000)) + 5)
/* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */
# define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT) / 1000)) + 5)*2)
2003-10-29 07:58:48 +03:00
/* size of listen() backlog in smbd */
# define SMBD_LISTEN_BACKLOG 50
2004-06-08 20:14:31 +04:00
/* Number of microseconds to wait before a sharing violation. */
# define SHARING_VIOLATION_USEC_WAIT 950000
2008-04-07 11:27:22 +04:00
/* Number of microseconds to wait before a updating the write time (2 secs). */
# define WRITE_TIME_UPDATE_USEC_DELAY 2000000
2004-07-02 02:55:38 +04:00
# define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */
2005-11-01 05:07:26 +03:00
/* tdb hash size for the open database. */
2006-03-30 02:19:01 +04:00
# define SMB_OPEN_DATABASE_TDB_HASH_SIZE 10007
2005-11-01 05:07:26 +03:00
2006-02-04 01:19:41 +03:00
/* Characters we disallow in sharenames. */
# define INVALID_SHARENAME_CHARS "%<>*?| / \\+=;:\","
/* Seconds between connection attempts to a remote server. */
2011-11-14 13:01:03 +04:00
# define FAILED_CONNECTION_CACHE_TIMEOUT (LONG_CONNECT_TIMEOUT * 2 / 1000)
2006-02-04 01:19:41 +03:00
/* Default hash size for the winbindd cache. */
# define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000
2006-07-18 05:20:26 +04:00
/* Windows minimum lock resolution timeout in ms */
# define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
2009-02-14 03:06:17 +03:00
/* Maximum size of RPC data we will accept for one call. */
# define MAX_RPC_DATA_SIZE (15*1024*1024)
2015-06-22 06:38:04 +03:00
/* A guestimate of how many domains winbindd will be contacting */
# ifndef WINBIND_MAX_DOMAINS_HINT
# define WINBIND_MAX_DOMAINS_HINT 10
# endif
1996-05-04 11:50:46 +04:00
# endif