1 /* Copyright (C) 1995-1998 Samba-Team */
2 /* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
4 /* local definitions for file server */
8 /* The default workgroup - usually overridden in smb.conf */
9 #ifndef DEFAULT_WORKGROUP
10 #define DEFAULT_WORKGROUP "WORKGROUP"
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
18 #ifndef MAX_DEBUG_LEVEL
19 #define MAX_DEBUG_LEVEL 1000
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"
29 /* This defines the section name in the configuration file that will
30 refer to the special "homes" service */
31 #define HOMES_NAME "homes"
33 /* This defines the section name in the configuration file that will
34 refer to the special "printers" service */
35 #define PRINTERS_NAME "printers"
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
41 /* define what facility to use for syslog */
42 #ifndef SYSLOG_FACILITY
43 #define SYSLOG_FACILITY LOG_DAEMON
46 /* the maximum password length before we declare a likely attack */
47 #define MAX_PASS_LEN 200
49 /* separators for lists */
50 #define LIST_SEP " \t,\n\r"
52 /* wchar separators for lists */
53 #define LIST_SEP_W wchar_list_sep
55 /* what default type of filesystem do we want this to show up as in a
56 NT file manager window? */
57 #define FSTYPE_STRING "NTFS"
59 /* the default guest account - normally set in the Makefile or smb.conf */
61 #define GUEST_ACCOUNT "nobody"
64 /* user to test password server with as invalid in security=server mode. */
65 #ifndef INVALID_USER_PREFIX
66 #define INVALID_USER_PREFIX "sambatest"
69 /* the default pager to use for the client "more" command. Users can
70 override this with the PAGER environment variable */
75 /* the size of the uid cache used to reduce valid user checks */
76 #define VUID_CACHE_SIZE 32
78 /* the following control timings of various actions. Don't change
79 them unless you know what you are doing. These are all in seconds */
80 #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
81 #define SMBD_RELOAD_CHECK (180)
82 #define IDLE_CLOSED_TIMEOUT (60)
83 #define DPTR_IDLE_TIMEOUT (120)
84 #define SMBD_SELECT_TIMEOUT (60)
85 #define NMBD_SELECT_LOOP (10)
86 #define BROWSE_INTERVAL (60)
87 #define REGISTRATION_INTERVAL (10*60)
88 #define NMBD_INETD_TIMEOUT (120)
89 #define NMBD_MAX_TTL (24*60*60)
90 #define LPQ_LOCK_TIMEOUT (5)
91 #define NMBD_INTERFACES_RELOAD (120)
92 #define NMBD_UNEXPECTED_TIMEOUT (15)
94 /* the following are in milliseconds */
95 #define LOCK_RETRY_TIMEOUT (100)
97 /* do you want to dump core (carefully!) when an internal error is
98 encountered? Samba will be careful to make the core file only
102 /* shall we support browse requests via a FIFO to nmbd? */
103 #define ENABLE_FIFO 1
105 /* how long (in miliseconds) to wait for a socket connect to happen */
106 #define LONG_CONNECT_TIMEOUT 30000
107 #define SHORT_CONNECT_TIMEOUT 5000
109 /* the default netbios keepalive timeout */
110 #define DEFAULT_KEEPALIVE 300
112 /* the directory to sit in when idle */
113 /* #define IDLE_DIR "/" */
115 /* Timout (in seconds) to wait for an oplock break
116 message to return from the client. */
118 #define OPLOCK_BREAK_TIMEOUT 30
120 /* Timout (in seconds) to add to the oplock break timeout
121 to wait for the smbd to smbd message to return. */
123 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
126 * Default passwd chat script.
128 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
130 /* Minimum length of allowed password when changing UNIX password. */
131 #define MINPASSWDLENGTH 5
133 /* maximum ID number used for session control. This cannot be larger
134 than 62*62 for the current code */
135 #define MAX_SESSION_ID 3000
137 /* shall we deny oplocks to clients that get timeouts? */
138 #define FASCIST_OPLOCK_BACKOFF 1
140 /* Max number of jobs per print queue. */
141 #define PRINT_MAX_JOBID 10000
143 /* Tuning for server auth mutex. */
144 #define CLI_AUTH_TIMEOUT 5000 /* In milli-seconds. */
145 #define NUM_CLI_AUTH_CONNECT_RETRIES 3
146 /* Number in seconds to wait for the mutex. This must be less than 30 seconds. */
147 #define SERVER_MUTEX_WAIT_TIME ( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)
148 /* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */
149 #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
151 /* Max number of simultaneous winbindd socket connections. */
152 #define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200