Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

291 lines
7.4 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. srvstrng.c
  5. Abstract:
  6. This module defines global string data for the LAN Manager server.
  7. The globals defined herein are part of the server driver image, and
  8. are therefore loaded into the system address space and are
  9. nonpageable.
  10. Author:
  11. Chuck Lenzmeier (chuckl) 6-Oct-1993
  12. Revision History:
  13. --*/
  14. #include "precomp.h"
  15. #include "srvstrng.tmh"
  16. #pragma hdrstop
  17. //
  18. // Device prefix strings.
  19. //
  20. PWSTR StrNamedPipeDevice = L"\\Device\\NamedPipe\\";
  21. PWSTR StrMailslotDevice = L"\\Device\\Mailslot\\";
  22. PWSTR StrSlashPipe = UNICODE_SMB_PIPE_PREFIX;
  23. PSTR StrSlashPipeAnsi = SMB_PIPE_PREFIX;
  24. PWSTR StrSlashPipeSlash = L"\\PIPE\\";
  25. PSTR StrPipeSlash = CANONICAL_PIPE_PREFIX;
  26. PWSTR StrSlashMailslot = UNICODE_SMB_MAILSLOT_PREFIX;
  27. //
  28. // Pipe name for remote down-level API requests.
  29. //
  30. PWSTR StrPipeApi = L"\\PIPE\\LANMAN";
  31. PSTR StrPipeApiOem = "\\PIPE\\LANMAN";
  32. PWSTR StrNull = L"";
  33. PSTR StrNullAnsi = "";
  34. PWSTR StrUnknownClient = L"(?)";
  35. PWSTR StrServerDevice = SERVER_DEVICE_NAME;
  36. PSTR StrLogonProcessName = "LAN Manager Server";
  37. PSTR StrLogonPackageName = MSV1_0_PACKAGE_NAME;
  38. WCHAR StrStarDotStar[] = L"*.*";
  39. PSTR StrTransportAddress = TdiTransportAddress;
  40. PSTR StrConnectionContext = TdiConnectionContext;
  41. PWSTR StrUserAlertEventName = ALERT_USER_EVENT;
  42. PWSTR StrAdminAlertEventName = ALERT_ADMIN_EVENT;
  43. PWSTR StrDefaultSrvDisplayName = SERVER_DISPLAY_NAME;
  44. PWSTR StrNoNameTransport = L"<No Name>";
  45. PWSTR StrAlerterMailslot = L"\\Device\\Mailslot\\Alerter";
  46. //
  47. // Registry paths.
  48. //
  49. PWSTR StrRegServerPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\LanmanServer";
  50. PWSTR StrRegSrvDisplayName = L"DisplayName";
  51. PWSTR StrRegOsVersionPath = L"\\Registry\\Machine\\Software\\Microsoft\\Windows Nt\\CurrentVersion";
  52. PWSTR StrRegVersionKeyName = L"CurrentVersion";
  53. PWSTR StrRegSrvParameterPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\LanmanServer\\Parameters";
  54. PWSTR StrRegExtendedCharsInPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\FileSystem";
  55. PWSTR StrRegExtendedCharsInPathValue = L"NtfsAllowExtendedCharacterIn8dot3Name";
  56. PWSTR StrRegNullSessionPipes = L"NullSessionPipes";
  57. PWSTR StrRegNullSessionShares = L"NullSessionShares";
  58. PWSTR StrRegPipesNeedLicense = L"PipesNeedLicense";
  59. PWSTR StrRegNoRemapPipes = L"NoRemapPipes";
  60. PWSTR StrRegEnforceLogoffTimes = L"EnforceLogoffTimes";
  61. PWSTR StrRegDisableDosChecking = L"DisableDoS";
  62. UNICODE_STRING StrRegSrvPnpClientName = { 24, 24, L"LanManServer" };
  63. PWSTR StrRegErrorLogIgnore = L"ErrorLogIgnore";
  64. #if SRVNTVERCHK
  65. PWSTR StrRegInvalidDomainNames = L"InvalidDomainsForNt5Clients";
  66. PWSTR StrRegAllowedIPAddresses = L"ValidNT5IPAddr";
  67. #endif
  68. //
  69. // Pipes that are never remapped, even when running on clusters (see open.c::RemapPipeName())
  70. //
  71. STATIC
  72. PWSTR StrDefaultNoRemapPipeNames[] = {
  73. L"netlogon",
  74. L"lsarpc",
  75. L"samr",
  76. L"browser",
  77. L"srvsvc",
  78. L"wkssvc",
  79. NULL
  80. };
  81. //
  82. // Pipes that are accessible by the NULL session.
  83. //
  84. STATIC
  85. PWSTR StrDefaultNullSessionPipes[] = {
  86. L"netlogon",
  87. L"lsarpc",
  88. L"samr",
  89. L"browser",
  90. L"srvsvc",
  91. L"wkssvc",
  92. NULL
  93. };
  94. //
  95. // Shares that are accessible by the NULL session.
  96. //
  97. STATIC
  98. PWSTR StrDefaultNullSessionShares[] = {
  99. NULL
  100. };
  101. //
  102. // DOS device names that can not be accessed by clients
  103. //
  104. UNICODE_STRING SrvDosDevices[] = {
  105. { 8, 8, L"LPT1"},
  106. { 8, 8, L"LPT2"},
  107. { 8, 8, L"LPT3"},
  108. { 8, 8, L"LPT4"},
  109. { 8, 8, L"LPT5"},
  110. { 8, 8, L"LPT6"},
  111. { 8, 8, L"LPT7"},
  112. { 8, 8, L"LPT8"},
  113. { 8, 8, L"LPT9"},
  114. { 8, 8, L"COM1"},
  115. { 8, 8, L"COM2"},
  116. { 8, 8, L"COM3"},
  117. { 8, 8, L"COM4"},
  118. { 8, 8, L"COM5"},
  119. { 8, 8, L"COM6"},
  120. { 8, 8, L"COM7"},
  121. { 8, 8, L"COM8"},
  122. { 8, 8, L"COM9"},
  123. { 6, 6, L"PRN" },
  124. { 6, 6, L"AUX" },
  125. { 6, 6, L"NUL" },
  126. { 6, 6, L"CON" },
  127. { 12, 12, L"CLOCK$" },
  128. {0}
  129. };
  130. //
  131. // Name of EA data file on FAT
  132. //
  133. UNICODE_STRING SrvEaFileName = { 22, 22, L"EA DATA. SF" };
  134. //
  135. // Pipes that require a license from the license server.
  136. //
  137. STATIC
  138. PWSTR StrDefaultPipesNeedLicense[] = {
  139. L"spoolss",
  140. NULL
  141. };
  142. //
  143. // Error codes that should not be logged
  144. //
  145. STATIC
  146. PWSTR StrDefaultErrorLogIgnore[] = {
  147. L"C0000001", //STATUS_UNSUCCESSFUL
  148. L"C000013B", //STATUS_LOCAL_DISCONNECT
  149. L"C000013C", //STATUS_REMOTE_DISCONNECT
  150. L"C000013E", //STATUS_LINK_FAILED
  151. L"C000013F", //STATUS_LINK_TIMEOUT
  152. L"C00000B0", //STATUS_PIPE_DISCONNECTED
  153. L"C00000B1", //STATUS_PIPE_CLOSING
  154. L"C0000121", //STATUS_CANNOT_DELETE
  155. L"C00000B5", //STATUS_IO_TIMEOUT
  156. L"C0000120", //STATUS_CANCELLED
  157. L"C0000034", //STATUS_OBJECT_NAME_NOT_FOUND
  158. L"C000003A", //STATUS_OBJECT_PATH_NOT_FOUND
  159. L"C0000022", //STATUS_ACCESS_DENIED
  160. L"C000013B", //STATUS_LOCAL_DISCONNECT
  161. L"C000013C", //STATUS_REMOTE_DISCONNECT
  162. L"C000013E", //STATUS_LINK_FAILED
  163. L"C000020C", //STATUS_CONNECTION_DISCONNECTED
  164. L"C0000241", //STATUS_CONNECTION_ABORTED
  165. L"C0000140", //STATUS_INVALID_CONNECTION
  166. L"C000023A", //STATUS_CONNECTION_INVALID
  167. L"C000020D", //STATUS_CONNECTION_RESET
  168. L"C00000B5", //STATUS_IO_TIMEOUT
  169. L"C000023C", //STATUS_NETWORK_UNREACHABLE
  170. L"C0000120", //STATUS_CANCELLED
  171. L"C000013F", //STATUS_LINK_TIMEOUT
  172. L"C0000008", //STATUS_INVALID_HANDLE
  173. L"C000009A", //STATUS_INSUFFICIENT_RESOURCES
  174. 0
  175. };
  176. //
  177. // StrDialects[] holds ASCII strings corresponding to the dialects
  178. // that the NT LanMan server can speak. They are listed in descending
  179. // order of preference, so the first listed is the one we'd most like to
  180. // use. This array should match the SMB_DIALECT enum in inc\smbtypes.h
  181. //
  182. STATIC
  183. PSTR StrDialects[] = {
  184. CAIROX, // Cairo
  185. #ifdef INCLUDE_SMB_IFMODIFIED
  186. NTLANMAN2, // NT LanMan2
  187. #endif
  188. NTLANMAN, // NT LanMan
  189. LANMAN21, // OS/2 LanMan 2.1
  190. DOSLANMAN21, // DOS LanMan 2.1
  191. LANMAN12, // OS/2 1.2 LanMan 2.0
  192. DOSLANMAN12, // DOS LanMan 2.0
  193. LANMAN10, // 1st version of full LanMan extensions
  194. MSNET30, // Larger subset of LanMan extensions
  195. MSNET103, // Limited subset of LanMan extensions
  196. PCLAN1, // Alternate original protocol
  197. PCNET1, // Original protocol
  198. "ILLEGAL",
  199. };
  200. //
  201. // StrClientTypes[] holds strings mapping dialects to client versions.
  202. //
  203. STATIC
  204. PWSTR StrClientTypes[] = {
  205. L"Cairo",
  206. #ifdef INCLUDE_SMB_IFMODIFIED
  207. L"NT2",
  208. #endif
  209. L"NT",
  210. L"OS/2 LM 2.1",
  211. L"DOS LM 2.1",
  212. L"OS/2 LM 2.0",
  213. L"DOS LM 2.0",
  214. L"OS/2 LM 1.0",
  215. L"DOS LM",
  216. L"DOWN LEVEL"
  217. };
  218. #if DBG
  219. PWSTR StrWriteAndX = L"WriteAndX";
  220. #endif
  221. WCHAR StrQuestionMarks[] = L"????????.???";
  222. PWSTR StrFsCdfs = FS_CDFS;
  223. PWSTR StrFsFat = FS_FAT;
  224. PWSTR StrNativeOsPrefix = L"Windows ";
  225. PWSTR StrDefaultNativeOs = L"Windows 2000";
  226. PSTR StrDefaultNativeOsOem = "Windows 2000";
  227. PWSTR StrNativeLanman = L"Windows 2000 LAN Manager";
  228. PSTR StrNativeLanmanOem = "Windows 2000 LAN Manager";
  229. //
  230. // Table of service name strings. This table corresponds to the
  231. // enumerated type SHARE_TYPE. Keep the two in sync.
  232. //
  233. PSTR StrShareTypeNames[] = {
  234. SHARE_TYPE_NAME_DISK,
  235. SHARE_TYPE_NAME_PRINT,
  236. SHARE_TYPE_NAME_PIPE,
  237. SHARE_TYPE_NAME_WILD,
  238. };