Transaction2SubcommandHelper.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. /* Copyright (C) 2014-2019 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.IO;
  10. using SMBLibrary.SMB1;
  11. using Utilities;
  12. namespace SMBLibrary.Server.SMB1
  13. {
  14. internal class Transaction2SubcommandHelper
  15. {
  16. internal static Transaction2FindFirst2Response GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2FindFirst2Request subcommand, ISMBShare share, SMB1ConnectionState state)
  17. {
  18. SMB1Session session = state.GetSession(header.UID);
  19. string fileNamePattern = subcommand.FileName;
  20. if (!fileNamePattern.StartsWith(@"\"))
  21. {
  22. fileNamePattern = @"\" + fileNamePattern;
  23. }
  24. List<QueryDirectoryFileInformation> entries;
  25. FileInformationClass informationClass;
  26. try
  27. {
  28. informationClass = FindInformationHelper.ToFileInformationClass(subcommand.InformationLevel);
  29. }
  30. catch (UnsupportedInformationLevelException)
  31. {
  32. state.LogToServer(Severity.Verbose, "FindFirst2: Unsupported information level: {0}.", subcommand.InformationLevel);
  33. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  34. return null;
  35. }
  36. NTStatus searchStatus = SMB1FileStoreHelper.QueryDirectory(out entries, share.FileStore, fileNamePattern, informationClass, session.SecurityContext);
  37. if (searchStatus != NTStatus.STATUS_SUCCESS)
  38. {
  39. state.LogToServer(Severity.Verbose, "FindFirst2: Searched for '{0}{1}', NTStatus: {2}", share.Name, fileNamePattern, searchStatus.ToString());
  40. header.Status = searchStatus;
  41. return null;
  42. }
  43. // We ignore SearchAttributes
  44. state.LogToServer(Severity.Information, "FindFirst2: Searched for '{0}{1}', found {2} matching entries", share.Name, fileNamePattern, entries.Count);
  45. // [MS-CIFS] If no matching entries are found, the server SHOULD fail the request with STATUS_NO_SUCH_FILE.
  46. if (entries.Count == 0)
  47. {
  48. header.Status = NTStatus.STATUS_NO_SUCH_FILE;
  49. return null;
  50. }
  51. bool returnResumeKeys = (subcommand.Flags & FindFlags.SMB_FIND_RETURN_RESUME_KEYS) > 0;
  52. int entriesToReturn = Math.Min(subcommand.SearchCount, entries.Count);
  53. List<QueryDirectoryFileInformation> segment = entries.GetRange(0, entriesToReturn);
  54. int maxLength = (int)maxDataCount;
  55. FindInformationList findInformationList;
  56. try
  57. {
  58. findInformationList = FindInformationHelper.ToFindInformationList(segment, header.UnicodeFlag, maxLength);
  59. }
  60. catch (UnsupportedInformationLevelException)
  61. {
  62. state.LogToServer(Severity.Verbose, "FindFirst2: Unsupported information level: {0}.", subcommand.InformationLevel);
  63. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  64. return null;
  65. }
  66. int returnCount = findInformationList.Count;
  67. Transaction2FindFirst2Response response = new Transaction2FindFirst2Response();
  68. response.SetFindInformationList(findInformationList, header.UnicodeFlag);
  69. response.EndOfSearch = (returnCount == entries.Count);
  70. // If [..] the search fit within a single response and SMB_FIND_CLOSE_AT_EOS is set in the Flags field,
  71. // or if SMB_FIND_CLOSE_AFTER_REQUEST is set in the request,
  72. // the server SHOULD return a SID field value of zero.
  73. // This indicates that the search has been closed and is no longer active on the server.
  74. if ((response.EndOfSearch && subcommand.CloseAtEndOfSearch) || subcommand.CloseAfterRequest)
  75. {
  76. response.SID = 0;
  77. }
  78. else
  79. {
  80. ushort? searchHandle = session.AddOpenSearch(entries, returnCount);
  81. if (!searchHandle.HasValue)
  82. {
  83. header.Status = NTStatus.STATUS_OS2_NO_MORE_SIDS;
  84. return null;
  85. }
  86. response.SID = searchHandle.Value;
  87. }
  88. return response;
  89. }
  90. internal static Transaction2FindNext2Response GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2FindNext2Request subcommand, ISMBShare share, SMB1ConnectionState state)
  91. {
  92. SMB1Session session = state.GetSession(header.UID);
  93. OpenSearch openSearch = session.GetOpenSearch(subcommand.SID);
  94. if (openSearch == null)
  95. {
  96. state.LogToServer(Severity.Verbose, "FindNext2 failed. Invalid SID.");
  97. header.Status = NTStatus.STATUS_INVALID_HANDLE;
  98. return null;
  99. }
  100. bool returnResumeKeys = (subcommand.Flags & FindFlags.SMB_FIND_RETURN_RESUME_KEYS) > 0;
  101. int maxLength = (int)maxDataCount;
  102. int maxCount = Math.Min(openSearch.Entries.Count - openSearch.EnumerationLocation, subcommand.SearchCount);
  103. List<QueryDirectoryFileInformation> segment = openSearch.Entries.GetRange(openSearch.EnumerationLocation, maxCount);
  104. FindInformationList findInformationList;
  105. try
  106. {
  107. findInformationList = FindInformationHelper.ToFindInformationList(segment, header.UnicodeFlag, maxLength);
  108. }
  109. catch (UnsupportedInformationLevelException)
  110. {
  111. state.LogToServer(Severity.Verbose, "FindNext2: Unsupported information level: {0}.", subcommand.InformationLevel);
  112. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  113. return null;
  114. }
  115. int returnCount = findInformationList.Count;
  116. Transaction2FindNext2Response response = new Transaction2FindNext2Response();
  117. response.SetFindInformationList(findInformationList, header.UnicodeFlag);
  118. openSearch.EnumerationLocation += returnCount;
  119. response.EndOfSearch = (openSearch.EnumerationLocation == openSearch.Entries.Count);
  120. if (response.EndOfSearch)
  121. {
  122. session.RemoveOpenSearch(subcommand.SID);
  123. }
  124. return response;
  125. }
  126. internal static Transaction2QueryFSInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryFSInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
  127. {
  128. SMB1Session session = state.GetSession(header.UID);
  129. if (share is FileSystemShare)
  130. {
  131. if (!((FileSystemShare)share).HasReadAccess(session.SecurityContext, @"\"))
  132. {
  133. state.LogToServer(Severity.Verbose, "QueryFileSystemInformation on '{0}' failed. User '{1}' was denied access.", share.Name, session.UserName);
  134. header.Status = NTStatus.STATUS_ACCESS_DENIED;
  135. return null;
  136. }
  137. }
  138. Transaction2QueryFSInformationResponse response = new Transaction2QueryFSInformationResponse();
  139. if (subcommand.IsPassthroughInformationLevel)
  140. {
  141. FileSystemInformation fileSystemInfo;
  142. NTStatus status = share.FileStore.GetFileSystemInformation(out fileSystemInfo, subcommand.FileSystemInformationClass);
  143. if (status != NTStatus.STATUS_SUCCESS)
  144. {
  145. state.LogToServer(Severity.Verbose, "GetFileSystemInformation on '{0}' failed. Information class: {1}, NTStatus: {2}", share.Name, subcommand.FileSystemInformationClass, status);
  146. header.Status = status;
  147. return null;
  148. }
  149. state.LogToServer(Severity.Information, "GetFileSystemInformation on '{0}' succeeded. Information class: {1}", share.Name, subcommand.FileSystemInformationClass);
  150. response.SetFileSystemInformation(fileSystemInfo);
  151. }
  152. else
  153. {
  154. QueryFSInformation queryFSInformation;
  155. NTStatus status = SMB1FileStoreHelper.GetFileSystemInformation(out queryFSInformation, share.FileStore, subcommand.QueryFSInformationLevel);
  156. if (status != NTStatus.STATUS_SUCCESS)
  157. {
  158. state.LogToServer(Severity.Verbose, "GetFileSystemInformation on '{0}' failed. Information level: {1}, NTStatus: {2}", share.Name, subcommand.QueryFSInformationLevel, status);
  159. header.Status = status;
  160. return null;
  161. }
  162. state.LogToServer(Severity.Information, "GetFileSystemInformation on '{0}' succeeded. Information level: {1}", share.Name, subcommand.QueryFSInformationLevel);
  163. response.SetQueryFSInformation(queryFSInformation, header.UnicodeFlag);
  164. }
  165. if (response.InformationBytes.Length > maxDataCount)
  166. {
  167. header.Status = NTStatus.STATUS_BUFFER_OVERFLOW;
  168. response.InformationBytes = ByteReader.ReadBytes(response.InformationBytes, 0, (int)maxDataCount);
  169. }
  170. return response;
  171. }
  172. internal static Transaction2SetFSInformationResponse GetSubcommandResponse(SMB1Header header, Transaction2SetFSInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
  173. {
  174. SMB1Session session = state.GetSession(header.UID);
  175. if (share is FileSystemShare)
  176. {
  177. if (!((FileSystemShare)share).HasWriteAccess(session.SecurityContext, @"\"))
  178. {
  179. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' failed. User '{1}' was denied access.", share.Name, session.UserName);
  180. header.Status = NTStatus.STATUS_ACCESS_DENIED;
  181. return null;
  182. }
  183. }
  184. if (!subcommand.IsPassthroughInformationLevel)
  185. {
  186. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' failed. Not a pass-through information level.", share.Name);
  187. header.Status = NTStatus.STATUS_NOT_SUPPORTED;
  188. return null;
  189. }
  190. FileSystemInformation fileSystemInfo;
  191. try
  192. {
  193. fileSystemInfo = FileSystemInformation.GetFileSystemInformation(subcommand.InformationBytes, 0, subcommand.FileSystemInformationClass);
  194. }
  195. catch (UnsupportedInformationLevelException)
  196. {
  197. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' failed. Information class: {1}, NTStatus: STATUS_OS2_INVALID_LEVEL.", share.Name, subcommand.FileSystemInformationClass);
  198. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  199. return null;
  200. }
  201. catch (Exception)
  202. {
  203. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' failed. Information class: {1}, NTStatus: STATUS_INVALID_PARAMETER.", share.Name, subcommand.FileSystemInformationClass);
  204. header.Status = NTStatus.STATUS_INVALID_PARAMETER;
  205. return null;
  206. }
  207. NTStatus status = share.FileStore.SetFileSystemInformation(fileSystemInfo);
  208. if (status != NTStatus.STATUS_SUCCESS)
  209. {
  210. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' failed. Information class: {1}, NTStatus: {2}.", share.Name, subcommand.FileSystemInformationClass, status);
  211. header.Status = status;
  212. return null;
  213. }
  214. state.LogToServer(Severity.Verbose, "SetFileSystemInformation on '{0}' succeeded. Information class: {1}.", share.Name, subcommand.FileSystemInformationClass);
  215. return new Transaction2SetFSInformationResponse();
  216. }
  217. internal static Transaction2QueryPathInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryPathInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
  218. {
  219. SMB1Session session = state.GetSession(header.UID);
  220. string path = subcommand.FileName;
  221. if (!path.StartsWith(@"\"))
  222. {
  223. path = @"\" + path;
  224. }
  225. if (share is FileSystemShare)
  226. {
  227. if (!((FileSystemShare)share).HasReadAccess(session.SecurityContext, path))
  228. {
  229. state.LogToServer(Severity.Verbose, "QueryPathInformation on '{0}{1}' failed. User '{2}' was denied access.", share.Name, path, session.UserName);
  230. header.Status = NTStatus.STATUS_ACCESS_DENIED;
  231. return null;
  232. }
  233. }
  234. Transaction2QueryPathInformationResponse response = new Transaction2QueryPathInformationResponse();
  235. if (subcommand.IsPassthroughInformationLevel && subcommand.FileInformationClass != FileInformationClass.FileAllInformation)
  236. {
  237. FileInformation fileInfo;
  238. NTStatus status = SMB1FileStoreHelper.GetFileInformation(out fileInfo, share.FileStore, path, subcommand.FileInformationClass, session.SecurityContext);
  239. if (status != NTStatus.STATUS_SUCCESS)
  240. {
  241. state.LogToServer(Severity.Verbose, "GetFileInformation on '{0}{1}' failed. Information class: {2}, NTStatus: {3}", share.Name, path, subcommand.FileInformationClass, status);
  242. header.Status = status;
  243. return null;
  244. }
  245. state.LogToServer(Severity.Information, "GetFileInformation on '{0}{1}' succeeded. Information class: {2}", share.Name, path, subcommand.FileInformationClass);
  246. response.SetFileInformation(fileInfo);
  247. }
  248. else
  249. {
  250. // The FILE_ALL_INFORMATION structure described in [MS-FSCC], is NOT used by [MS-SMB]
  251. if (subcommand.IsPassthroughInformationLevel && subcommand.FileInformationClass == FileInformationClass.FileAllInformation)
  252. {
  253. subcommand.QueryInformationLevel = QueryInformationLevel.SMB_QUERY_FILE_ALL_INFO;
  254. }
  255. QueryInformation queryInformation;
  256. NTStatus status = SMB1FileStoreHelper.GetFileInformation(out queryInformation, share.FileStore, path, subcommand.QueryInformationLevel, session.SecurityContext);
  257. if (status != NTStatus.STATUS_SUCCESS)
  258. {
  259. state.LogToServer(Severity.Verbose, "GetFileInformation on '{0}{1}' failed. Information level: {2}, NTStatus: {3}", share.Name, path, subcommand.QueryInformationLevel, status);
  260. header.Status = status;
  261. return null;
  262. }
  263. state.LogToServer(Severity.Information, "GetFileInformation on '{0}{1}' succeeded. Information level: {2}", share.Name, path, subcommand.QueryInformationLevel);
  264. response.SetQueryInformation(queryInformation);
  265. }
  266. if (response.InformationBytes.Length > maxDataCount)
  267. {
  268. header.Status = NTStatus.STATUS_BUFFER_OVERFLOW;
  269. response.InformationBytes = ByteReader.ReadBytes(response.InformationBytes, 0, (int)maxDataCount);
  270. }
  271. return response;
  272. }
  273. internal static Transaction2QueryFileInformationResponse GetSubcommandResponse(SMB1Header header, uint maxDataCount, Transaction2QueryFileInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
  274. {
  275. SMB1Session session = state.GetSession(header.UID);
  276. OpenFileObject openFile = session.GetOpenFileObject(subcommand.FID);
  277. if (openFile == null)
  278. {
  279. state.LogToServer(Severity.Verbose, "QueryFileInformation failed. Invalid FID. (UID: {0}, TID: {1}, FID: {2})", header.UID, header.TID, subcommand.FID);
  280. header.Status = NTStatus.STATUS_INVALID_HANDLE;
  281. return null;
  282. }
  283. if (share is FileSystemShare)
  284. {
  285. if (!((FileSystemShare)share).HasReadAccess(session.SecurityContext, openFile.Path))
  286. {
  287. state.LogToServer(Severity.Verbose, "QueryFileInformation on '{0}{1}' failed. User '{2}' was denied access.", share.Name, openFile.Path, session.UserName);
  288. header.Status = NTStatus.STATUS_ACCESS_DENIED;
  289. return null;
  290. }
  291. }
  292. Transaction2QueryFileInformationResponse response = new Transaction2QueryFileInformationResponse();
  293. if (subcommand.IsPassthroughInformationLevel && subcommand.FileInformationClass != FileInformationClass.FileAllInformation)
  294. {
  295. FileInformation fileInfo;
  296. NTStatus status = share.FileStore.GetFileInformation(out fileInfo, openFile.Handle, subcommand.FileInformationClass);
  297. if (status != NTStatus.STATUS_SUCCESS)
  298. {
  299. state.LogToServer(Severity.Verbose, "GetFileInformation on '{0}{1}' failed. Information class: {2}, NTStatus: {3}. (FID: {4})", share.Name, openFile.Path, subcommand.FileInformationClass, status, subcommand.FID);
  300. header.Status = status;
  301. return null;
  302. }
  303. state.LogToServer(Severity.Information, "GetFileInformation on '{0}{1}' succeeded. Information class: {2}. (FID: {3})", share.Name, openFile.Path, subcommand.FileInformationClass, subcommand.FID);
  304. response.SetFileInformation(fileInfo);
  305. }
  306. else
  307. {
  308. // The FILE_ALL_INFORMATION structure described in [MS-FSCC], is NOT used by [MS-SMB]
  309. if (subcommand.IsPassthroughInformationLevel && subcommand.FileInformationClass == FileInformationClass.FileAllInformation)
  310. {
  311. subcommand.QueryInformationLevel = QueryInformationLevel.SMB_QUERY_FILE_ALL_INFO;
  312. }
  313. QueryInformation queryInformation;
  314. NTStatus status = SMB1FileStoreHelper.GetFileInformation(out queryInformation, share.FileStore, openFile.Handle, subcommand.QueryInformationLevel);
  315. if (status != NTStatus.STATUS_SUCCESS)
  316. {
  317. state.LogToServer(Severity.Verbose, "GetFileInformation on '{0}{1}' failed. Information level: {2}, NTStatus: {3}. (FID: {4})", share.Name, openFile.Path, subcommand.QueryInformationLevel, status, subcommand.FID);
  318. header.Status = status;
  319. return null;
  320. }
  321. state.LogToServer(Severity.Information, "GetFileInformation on '{0}{1}' succeeded. Information level: {2}. (FID: {3})", share.Name, openFile.Path, subcommand.QueryInformationLevel, subcommand.FID);
  322. response.SetQueryInformation(queryInformation);
  323. }
  324. if (response.InformationBytes.Length > maxDataCount)
  325. {
  326. header.Status = NTStatus.STATUS_BUFFER_OVERFLOW;
  327. response.InformationBytes = ByteReader.ReadBytes(response.InformationBytes, 0, (int)maxDataCount);
  328. }
  329. return response;
  330. }
  331. internal static Transaction2SetFileInformationResponse GetSubcommandResponse(SMB1Header header, Transaction2SetFileInformationRequest subcommand, ISMBShare share, SMB1ConnectionState state)
  332. {
  333. SMB1Session session = state.GetSession(header.UID);
  334. OpenFileObject openFile = session.GetOpenFileObject(subcommand.FID);
  335. if (openFile == null)
  336. {
  337. state.LogToServer(Severity.Verbose, "SetFileInformation failed. Invalid FID. (UID: {0}, TID: {1}, FID: {2})", header.UID, header.TID, subcommand.FID);
  338. header.Status = NTStatus.STATUS_INVALID_HANDLE;
  339. return null;
  340. }
  341. if (share is FileSystemShare)
  342. {
  343. if (!((FileSystemShare)share).HasWriteAccess(session.SecurityContext, openFile.Path))
  344. {
  345. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. User '{2}' was denied access.", share.Name, openFile.Path, session.UserName);
  346. header.Status = NTStatus.STATUS_ACCESS_DENIED;
  347. return null;
  348. }
  349. }
  350. if (subcommand.IsPassthroughInformationLevel)
  351. {
  352. FileInformation fileInfo;
  353. try
  354. {
  355. fileInfo = FileInformation.GetFileInformation(subcommand.InformationBytes, 0, subcommand.FileInformationClass);
  356. }
  357. catch (UnsupportedInformationLevelException)
  358. {
  359. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information class: {2}, NTStatus: STATUS_OS2_INVALID_LEVEL.", share.Name, openFile.Path, subcommand.FileInformationClass);
  360. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  361. return null;
  362. }
  363. catch (Exception)
  364. {
  365. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information class: {2}, NTStatus: STATUS_INVALID_PARAMETER.", share.Name, openFile.Path, subcommand.FileInformationClass);
  366. header.Status = NTStatus.STATUS_INVALID_PARAMETER;
  367. return null;
  368. }
  369. NTStatus status = share.FileStore.SetFileInformation(openFile.Handle, fileInfo);
  370. if (status != NTStatus.STATUS_SUCCESS)
  371. {
  372. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information class: {2}, NTStatus: {3}. (FID: {4})", share.Name, openFile.Path, subcommand.FileInformationClass, status, subcommand.FID);
  373. header.Status = status;
  374. return null;
  375. }
  376. state.LogToServer(Severity.Information, "SetFileInformation on '{0}{1}' succeeded. Information class: {2}. (FID: {3})", share.Name, openFile.Path, subcommand.FileInformationClass, subcommand.FID);
  377. }
  378. else
  379. {
  380. SetInformation information;
  381. try
  382. {
  383. information = SetInformation.GetSetInformation(subcommand.InformationBytes, subcommand.SetInformationLevel);
  384. }
  385. catch (UnsupportedInformationLevelException)
  386. {
  387. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information level: {2}, NTStatus: STATUS_OS2_INVALID_LEVEL.", share.Name, openFile.Path, subcommand.SetInformationLevel);
  388. header.Status = NTStatus.STATUS_OS2_INVALID_LEVEL;
  389. return null;
  390. }
  391. catch (Exception)
  392. {
  393. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information level: {2}, NTStatus: STATUS_INVALID_PARAMETER.", share.Name, openFile.Path, subcommand.SetInformationLevel);
  394. header.Status = NTStatus.STATUS_INVALID_PARAMETER;
  395. return null;
  396. }
  397. NTStatus status = SMB1FileStoreHelper.SetFileInformation(share.FileStore, openFile.Handle, information);
  398. if (status != NTStatus.STATUS_SUCCESS)
  399. {
  400. state.LogToServer(Severity.Verbose, "SetFileInformation on '{0}{1}' failed. Information level: {2}, NTStatus: {3}. (FID: {4})", share.Name, openFile.Path, subcommand.SetInformationLevel, status, subcommand.FID);
  401. header.Status = status;
  402. return null;
  403. }
  404. state.LogToServer(Severity.Information, "SetFileInformation on '{0}{1}' succeeded. Information level: {2}. (FID: {3})", share.Name, openFile.Path, subcommand.SetInformationLevel, subcommand.FID);
  405. }
  406. Transaction2SetFileInformationResponse response = new Transaction2SetFileInformationResponse();
  407. return response;
  408. }
  409. }
  410. }