lib/param: Rename "socket address" to "nbt client socket address" to clarify role
[kai/samba.git] / source3 / include / local.h
index 29b0641119de060e2dfffbf44a8147a55c1290f5..02e6b43673eb70fb79ae16fef851a296b77c6d6e 100644 (file)
@@ -5,35 +5,6 @@
 #ifndef _LOCAL_H
 #define _LOCAL_H
 
-/* The default workgroup - usually overridden in smb.conf */
-#ifndef WORKGROUP
-#define WORKGROUP "WORKGROUP"
-#endif
-
-/* the maximum debug level to compile into the code. This assumes a good 
-   optimising compiler that can remove unused code 
-   for embedded or low-memory systems set this to a value like 2 to get
-   only important messages. This gives *much* smaller binaries
-*/
-#ifndef MAX_DEBUG_LEVEL
-#define MAX_DEBUG_LEVEL 1000
-#endif
-
-/* This defines the section name in the configuration file that will contain */
-/* global parameters - that is, parameters relating to the whole server, not */
-/* just services. This name is then reserved, and may not be used as a       */
-/* a service name. It will default to "global" if not defined here.          */
-#define GLOBAL_NAME "global"
-#define GLOBAL_NAME2 "globals"
-
-/* This defines the section name in the configuration file that will
-   refer to the special "homes" service */
-#define HOMES_NAME "homes"
-
-/* This defines the section name in the configuration file that will
-   refer to the special "printers" service */
-#define PRINTERS_NAME "printers"
-
 /* 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
 /* maximum number of file caches per smbd */
 #define MAX_WRITE_CACHES 10
 
-/* define what facility to use for syslog */
-#ifndef SYSLOG_FACILITY
-#define SYSLOG_FACILITY LOG_DAEMON
+/*
+ * Fudgefactor required for open tdb's, etc.
+ */
+
+#ifndef MAX_OPEN_FUDGEFACTOR
+#define MAX_OPEN_FUDGEFACTOR 20
 #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
+#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"
@@ -64,9 +48,9 @@
  */
 
 #ifndef MAX_OPEN_FILES
-#define MAX_OPEN_FILES 10000
+#define MAX_OPEN_FILES (MIN_OPEN_FILES_WINDOWS + MAX_OPEN_FUDGEFACTOR)
 #endif
+
 #define WORDMAX 0xFFFF
 
 /* the maximum password length before we declare a likely attack */
 #define LPQ_LOCK_TIMEOUT (5)
 #define NMBD_INTERFACES_RELOAD (120)
 #define NMBD_UNEXPECTED_TIMEOUT (15)
+#define SMBD_HOUSEKEEPING_INTERVAL SMBD_SELECT_TIMEOUT
 
 /* the following are in milliseconds */
 #define LOCK_RETRY_TIMEOUT (100)
    it are worked out */
 #define USE_READ_PREDICTION 0
 
-/*
- * Default passwd chat script.
- */
-
-#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
-
 /* Minimum length of allowed password when changing UNIX password. */
 #define MINPASSWDLENGTH 5
 
 
 #ifndef SESSION_TEMPLATE
 /* Paramaters are 'pid' and 'vuid' */
-#define SESSION_TEMPLATE "smb/%lu/%d"
+#define SESSION_TEMPLATE "smb/%lu/%llu"
 #endif
 
 #ifndef SESSION_UTMP_TEMPLATE
 /* the maximum age in seconds of a password. Should be a lp_ parameter */
 #define MAX_PASSWORD_AGE (21*24*60*60)
 
-/* Allocation roundup. */
+/* Default allocation roundup. */
 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
 
 /* shall we deny oplocks to clients that get timeouts? */
 /* this enables the "rabbit pellet" fix for SMBwritebraw */
 #define RABBIT_PELLET_FIX 1
 
-/* Max number of jobs per print queue. */
-#define PRINT_MAX_JOBID 10000
-
 /* Max number of open RPC pipes. */
 #define MAX_OPEN_PIPES 2048
 
 /* 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)
 
-/* Max number of simultaneous winbindd socket connections. */
-#define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200
+/* Buffer size to use when printing backtraces */
+#define BACKTRACE_STACK_SIZE 64
+
+/* size of listen() backlog in smbd */
+#define SMBD_LISTEN_BACKLOG 50
+
+/* Number of microseconds to wait before a sharing violation. */
+#define SHARING_VIOLATION_USEC_WAIT 950000
+
+/* Number of microseconds to wait before a updating the write time (2 secs). */
+#define WRITE_TIME_UPDATE_USEC_DELAY 2000000
+
+#define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */
+
+/* tdb hash size for the open database. */
+#define SMB_OPEN_DATABASE_TDB_HASH_SIZE 10007
+
+/* Characters we disallow in sharenames. */
+#define INVALID_SHARENAME_CHARS "%<>*?|/\\+=;:\","
+
+/* Seconds between connection attempts to a remote server. */
+#define FAILED_CONNECTION_CACHE_TIMEOUT (LONG_CONNECT_TIMEOUT * 2 / 1000)
+
+/* Default hash size for the winbindd cache. */
+#define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000
+
+/* Windows minimum lock resolution timeout in ms */
+#define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
+
+/* Maximum size of RPC data we will accept for one call. */
+#define MAX_RPC_DATA_SIZE (15*1024*1024)
+
+#define CLIENT_NDR_PADDING_SIZE 8
+#define SERVER_NDR_PADDING_SIZE 8
+
+#define DEFAULT_SMB2_MAX_READ (1024*1024)
+#define DEFAULT_SMB2_MAX_WRITE (1024*1024)
+#define DEFAULT_SMB2_MAX_TRANSACT (1024*1024)
+#define DEFAULT_SMB2_MAX_CREDITS 8192
+
 #endif