Leaked source code of windows server 2003
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.

300 lines
8.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 StrRegVersionBuildNumberKeyName = L"CurrentBuildNumber";
  54. PWSTR StrRegVersionProductKeyName = L"ProductName";
  55. PWSTR StrRegVersionSPKeyName = L"CSDVersion";
  56. PWSTR StrRegSrvParameterPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\LanmanServer\\Parameters";
  57. PWSTR StrRegExtendedCharsInPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\FileSystem";
  58. PWSTR StrRegExtendedCharsInPathValue = L"NtfsAllowExtendedCharacterIn8dot3Name";
  59. PWSTR StrRegNullSessionPipes = L"NullSessionPipes";
  60. PWSTR StrRegNullSessionShares = L"NullSessionShares";
  61. PWSTR StrRegPipesNeedLicense = L"PipesNeedLicense";
  62. PWSTR StrRegNoRemapPipes = L"NoRemapPipes";
  63. PWSTR StrRegEnforceLogoffTimes = L"EnforceLogoffTimes";
  64. PWSTR StrRegDisableDosChecking = L"DisableDoS";
  65. PWSTR StrRegEnableSecuritySignatures = L"enablesecuritysignature";
  66. PWSTR StrRegRequireSecuritySignatures = L"requiresecuritysignature";
  67. PWSTR StrRegEnableExtendedSignatures = L"enableextendedsignature";
  68. PWSTR StrRegRequireExtendedSignatures = L"requireextendedsignature";
  69. PWSTR StrRegEnableInvalidSmbLogging = L"enableinvalidsmblogging";
  70. PWSTR StrRegDisableLargeRead = L"disablelargeread";
  71. PWSTR StrRegDisableLargeWrite = L"disablelargewrite";
  72. PWSTR StrRegNoAliasingOnFilesystem = L"noaliasingonfilesystem";
  73. PWSTR StrRegDisableDownlevelTimewarp = L"disabledownleveltimewarp";
  74. PWSTR StrRegMapNoIntermediateBuffering = L"mapnointermediatebuffering";
  75. UNICODE_STRING StrRegSrvPnpClientName = { 24, 24, L"LanManServer" };
  76. PWSTR StrRegErrorLogIgnore = L"ErrorLogIgnore";
  77. #if SRVNTVERCHK
  78. PWSTR StrRegInvalidDomainNames = L"InvalidDomainsForNt5Clients";
  79. PWSTR StrRegAllowedIPAddresses = L"ValidNT5IPAddr";
  80. #endif
  81. //
  82. // Pipes that are never remapped, even when running on clusters (see open.c::RemapPipeName())
  83. //
  84. STATIC
  85. PWSTR StrDefaultNoRemapPipeNames[] = {
  86. L"netlogon",
  87. L"lsarpc",
  88. L"samr",
  89. L"browser",
  90. L"srvsvc",
  91. L"wkssvc",
  92. NULL
  93. };
  94. //
  95. // Pipes that are accessible by the NULL session.
  96. //
  97. STATIC
  98. PWSTR StrDefaultNullSessionPipes[] = {
  99. L"netlogon",
  100. L"lsarpc",
  101. L"samr",
  102. L"browser",
  103. L"srvsvc",
  104. L"wkssvc",
  105. NULL
  106. };
  107. //
  108. // Shares that are accessible by the NULL session.
  109. //
  110. STATIC
  111. PWSTR StrDefaultNullSessionShares[] = {
  112. NULL
  113. };
  114. //
  115. // DOS device names that can not be accessed by clients
  116. //
  117. UNICODE_STRING SrvDosDevices[] = {
  118. { 8, 8, L"LPT1"},
  119. { 8, 8, L"LPT2"},
  120. { 8, 8, L"LPT3"},
  121. { 8, 8, L"LPT4"},
  122. { 8, 8, L"LPT5"},
  123. { 8, 8, L"LPT6"},
  124. { 8, 8, L"LPT7"},
  125. { 8, 8, L"LPT8"},
  126. { 8, 8, L"LPT9"},
  127. { 8, 8, L"COM1"},
  128. { 8, 8, L"COM2"},
  129. { 8, 8, L"COM3"},
  130. { 8, 8, L"COM4"},
  131. { 8, 8, L"COM5"},
  132. { 8, 8, L"COM6"},
  133. { 8, 8, L"COM7"},
  134. { 8, 8, L"COM8"},
  135. { 8, 8, L"COM9"},
  136. { 6, 6, L"PRN" },
  137. { 6, 6, L"AUX" },
  138. { 6, 6, L"NUL" },
  139. { 6, 6, L"CON" },
  140. { 12, 12, L"CLOCK$" },
  141. {0}
  142. };
  143. //
  144. // Name of EA data file on FAT
  145. //
  146. UNICODE_STRING SrvEaFileName = { 22, 22, L"EA DATA. SF" };
  147. //
  148. // Pipes that require a license from the license server.
  149. //
  150. STATIC
  151. PWSTR StrDefaultPipesNeedLicense[] = {
  152. L"spoolss",
  153. NULL
  154. };
  155. //
  156. // Error codes that should not be logged
  157. //
  158. STATIC
  159. PWSTR StrDefaultErrorLogIgnore[] = {
  160. L"C0000001", //STATUS_UNSUCCESSFUL
  161. L"C000013B", //STATUS_LOCAL_DISCONNECT
  162. L"C000013C", //STATUS_REMOTE_DISCONNECT
  163. L"C000013E", //STATUS_LINK_FAILED
  164. L"C000013F", //STATUS_LINK_TIMEOUT
  165. L"C00000B0", //STATUS_PIPE_DISCONNECTED
  166. L"C00000B1", //STATUS_PIPE_CLOSING
  167. L"C0000121", //STATUS_CANNOT_DELETE
  168. L"C00000B5", //STATUS_IO_TIMEOUT
  169. L"C0000120", //STATUS_CANCELLED
  170. L"C0000034", //STATUS_OBJECT_NAME_NOT_FOUND
  171. L"C000003A", //STATUS_OBJECT_PATH_NOT_FOUND
  172. L"C0000022", //STATUS_ACCESS_DENIED
  173. L"C000013B", //STATUS_LOCAL_DISCONNECT
  174. L"C000013C", //STATUS_REMOTE_DISCONNECT
  175. L"C000013E", //STATUS_LINK_FAILED
  176. L"C000020C", //STATUS_CONNECTION_DISCONNECTED
  177. L"C0000241", //STATUS_CONNECTION_ABORTED
  178. L"C0000140", //STATUS_INVALID_CONNECTION
  179. L"C000023A", //STATUS_CONNECTION_INVALID
  180. L"C000020D", //STATUS_CONNECTION_RESET
  181. L"C00000B5", //STATUS_IO_TIMEOUT
  182. L"C000023C", //STATUS_NETWORK_UNREACHABLE
  183. L"C0000120", //STATUS_CANCELLED
  184. L"C000013F", //STATUS_LINK_TIMEOUT
  185. L"C0000008", //STATUS_INVALID_HANDLE
  186. L"C000009A", //STATUS_INSUFFICIENT_RESOURCES
  187. 0
  188. };
  189. //
  190. // StrDialects[] holds ASCII strings corresponding to the dialects
  191. // that the NT LanMan server can speak. They are listed in descending
  192. // order of preference, so the first listed is the one we'd most like to
  193. // use. This array should match the SMB_DIALECT enum in inc\smbtypes.h
  194. //
  195. STATIC
  196. PSTR StrDialects[] = {
  197. CAIROX, // Cairo
  198. NTLANMAN, // NT LanMan
  199. LANMAN21, // OS/2 LanMan 2.1
  200. DOSLANMAN21, // DOS LanMan 2.1
  201. LANMAN12, // OS/2 1.2 LanMan 2.0
  202. DOSLANMAN12, // DOS LanMan 2.0
  203. LANMAN10, // 1st version of full LanMan extensions
  204. MSNET30, // Larger subset of LanMan extensions
  205. MSNET103, // Limited subset of LanMan extensions
  206. PCLAN1, // Alternate original protocol
  207. PCNET1, // Original protocol
  208. "ILLEGAL",
  209. };
  210. //
  211. // StrClientTypes[] holds strings mapping dialects to client versions.
  212. //
  213. STATIC
  214. PWSTR StrClientTypes[] = {
  215. L"Cairo",
  216. L"NT",
  217. L"OS/2 LM 2.1",
  218. L"DOS LM 2.1",
  219. L"OS/2 LM 2.0",
  220. L"DOS LM 2.0",
  221. L"OS/2 LM 1.0",
  222. L"DOS LM",
  223. L"DOWN LEVEL"
  224. };
  225. #if DBG
  226. PWSTR StrWriteAndX = L"WriteAndX";
  227. #endif
  228. WCHAR StrQuestionMarks[] = L"????????.???";
  229. PWSTR StrFsCdfs = FS_CDFS;
  230. PWSTR StrFsFat = FS_FAT;
  231. PWSTR StrNativeOsPrefix = L"Windows ";
  232. PWSTR StrDefaultNativeOs = L"Windows 2000";
  233. PSTR StrDefaultNativeOsOem = "Windows 2000";
  234. PWSTR StrNativeLanman = L"Windows 2000 LAN Manager";
  235. PSTR StrNativeLanmanOem = "Windows 2000 LAN Manager";
  236. //
  237. // Table of service name strings. This table corresponds to the
  238. // enumerated type SHARE_TYPE. Keep the two in sync.
  239. //
  240. PSTR StrShareTypeNames[] = {
  241. SHARE_TYPE_NAME_DISK,
  242. SHARE_TYPE_NAME_PRINT,
  243. SHARE_TYPE_NAME_PIPE,
  244. SHARE_TYPE_NAME_WILD,
  245. };