local.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /* Copyright (C) 1995-1998 Samba-Team */
  2. /* Copyright (C) 1998 John H Terpstra <jht@aquasoft.com.au> */
  3. /* local definitions for file server */
  4. #ifndef _LOCAL_H
  5. #define _LOCAL_H
  6. /* The default workgroup - usually overridden in smb.conf */
  7. #ifndef WORKGROUP
  8. #define WORKGROUP "WORKGROUP"
  9. #endif
  10. /* This defines the section name in the configuration file that will contain */
  11. /* global parameters - that is, parameters relating to the whole server, not */
  12. /* just services. This name is then reserved, and may not be used as a */
  13. /* a service name. It will default to "global" if not defined here. */
  14. #define GLOBAL_NAME "global"
  15. #define GLOBAL_NAME2 "globals"
  16. /* This defines the section name in the configuration file that will
  17. refer to the special "homes" service */
  18. #define HOMES_NAME "homes"
  19. /* This defines the section name in the configuration file that will
  20. refer to the special "printers" service */
  21. #define PRINTERS_NAME "printers"
  22. /* Yves Gaige <yvesg@hptnodur.grenoble.hp.com> requested this set this */
  23. /* to a maximum of 8 if old smb clients break because of long printer names. */
  24. #define MAXPRINTERLEN 15
  25. /* max number of directories open at once */
  26. /* note that with the new directory code this no longer requires a
  27. file handle per directory, but large numbers do use more memory */
  28. #define MAX_OPEN_DIRECTORIES 256
  29. /* max number of directory handles */
  30. /* As this now uses the bitmap code this can be
  31. quite large. */
  32. #define MAX_DIRECTORY_HANDLES 2048
  33. /* define what facility to use for syslog */
  34. #ifndef SYSLOG_FACILITY
  35. #define SYSLOG_FACILITY LOG_DAEMON
  36. #endif
  37. /* Default size of shared memory used for share mode locking */
  38. #ifndef SHMEM_SIZE
  39. #define SHMEM_SIZE (1024*1024)
  40. #endif
  41. /*
  42. * Default number of maximum open files per smbd. This is
  43. * also limited by the maximum available file descriptors
  44. * per process and can also be set in smb.conf as "max open files"
  45. * in the [global] section.
  46. */
  47. #ifndef MAX_OPEN_FILES
  48. #define MAX_OPEN_FILES 10000
  49. #endif
  50. /* the max number of simultanous connections to the server by all clients */
  51. #define MAXSTATUS 100000
  52. #define WORDMAX 0xFFFF
  53. /* the maximum password length before we declare a likely attack */
  54. #define MAX_PASS_LEN 200
  55. /* separators for lists */
  56. #define LIST_SEP " \t,;:\n\r"
  57. /* this is where browse lists are kept in the lock dir */
  58. #define SERVER_LIST "browse.dat"
  59. /* shall guest entries in printer queues get changed to user entries,
  60. so they can be deleted using the windows print manager? */
  61. #define LPQ_GUEST_TO_USER
  62. /* shall filenames with illegal chars in them get mangled in long
  63. filename listings? */
  64. #define MANGLE_LONG_FILENAMES
  65. /* define this if you want to stop spoofing with .. and soft links
  66. NOTE: This also slows down the server considerably */
  67. #define REDUCE_PATHS
  68. /* the size of the directory cache */
  69. #define DIRCACHESIZE 20
  70. /* what default type of filesystem do we want this to show up as in a
  71. NT file manager window? */
  72. #define FSTYPE_STRING "NTFS"
  73. /* the default guest account - normally set in the Makefile or smb.conf */
  74. #ifndef GUEST_ACCOUNT
  75. #define GUEST_ACCOUNT "nobody"
  76. #endif
  77. /* do you want smbd to send a 1 byte packet to nmbd to trigger it to start
  78. when smbd starts? */
  79. #ifndef PRIME_NMBD
  80. #define PRIME_NMBD 1
  81. #endif
  82. /* the default pager to use for the client "more" command. Users can
  83. override this with the PAGER environment variable */
  84. #ifndef PAGER
  85. #define PAGER "more"
  86. #endif
  87. /* the size of the uid cache used to reduce valid user checks */
  88. #define UID_CACHE_SIZE 4
  89. /* if mmap is enabled, then this is the maximum size of file to use
  90. the mmap code on. We don't want to mmap huge files as virtual
  91. address spaces are limited */
  92. #define MAX_MMAP_SIZE (100*0x100000)
  93. /* the following control timings of various actions. Don't change
  94. them unless you know what you are doing. These are all in seconds */
  95. #define DEFAULT_SMBD_TIMEOUT (60*60*24*7)
  96. #define SMBD_RELOAD_CHECK (180)
  97. #define IDLE_CLOSED_TIMEOUT (60)
  98. #define DPTR_IDLE_TIMEOUT (120)
  99. #define SMBD_SELECT_TIMEOUT (60)
  100. #define SMBD_SELECT_TIMEOUT_WITH_PENDING_LOCKS (10)
  101. #define NMBD_SELECT_LOOP (10)
  102. #define BROWSE_INTERVAL (60)
  103. #define REGISTRATION_INTERVAL (10*60)
  104. #define NMBD_INETD_TIMEOUT (120)
  105. #define NMBD_MAX_TTL (24*60*60)
  106. #define LPQ_LOCK_TIMEOUT (5)
  107. /* the following are in milliseconds */
  108. #define LOCK_RETRY_TIMEOUT (100)
  109. /* do you want to dump core (carefully!) when an internal error is
  110. encountered? Samba will be careful to make the core file only
  111. accessible to root */
  112. #define DUMP_CORE 1
  113. #define SMB_ALIGNMENT 1
  114. /* shall we support browse requests via a FIFO to nmbd? */
  115. #define ENABLE_FIFO 1
  116. /* how long (in miliseconds) to wait for a socket connect to happen */
  117. #define LONG_CONNECT_TIMEOUT 30000
  118. #define SHORT_CONNECT_TIMEOUT 5000
  119. /* default socket options. Dave Miller thinks we should default to TCP_NODELAY
  120. given the socket IO pattern that Samba uses*/
  121. #ifdef TCP_NODELAY
  122. #define DEFAULT_SOCKET_OPTIONS "TCP_NODELAY"
  123. #else
  124. #define DEFAULT_SOCKET_OPTIONS ""
  125. #endif
  126. /* the default netbios keepalive timeout */
  127. #define DEFAULT_KEEPALIVE 300
  128. /* the directory to sit in when idle */
  129. /* #define IDLE_DIR "/" */
  130. /* Timout (in seconds) to wait for an oplock break
  131. message to return from the client. */
  132. #define OPLOCK_BREAK_TIMEOUT 30
  133. /* how many times do we try to resend the oplock break request - useful
  134. for buggy MS clients */
  135. #define OPLOCK_BREAK_RESENDS 3
  136. /* Timout (in seconds) to add to the oplock break timeout
  137. to wait for the smbd to smbd message to return. */
  138. #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
  139. /* the read preciction code has been disabled until some problems with
  140. it are worked out */
  141. #define USE_READ_PREDICTION 0
  142. /* name of directory that netatalk uses to store macintosh resource forks */
  143. #define APPLEDOUBLE ".AppleDouble/"
  144. /*
  145. * Default passwd chat script.
  146. */
  147. #define DEFAULT_PASSWD_CHAT "*old*password* %o\\n *new*password* %n\\n *new*password* %n\\n *changed*"
  148. /* Minimum length of allowed password when changing UNIX password. */
  149. #define MINPASSWDLENGTH 5
  150. #endif