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.

710 lines
19 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. Ea.c
  5. Abstract:
  6. This module implements the EA routines for Rx called by
  7. the dispatch driver.
  8. Author:
  9. Joe Linn [JoeLi] 1-Jan-95
  10. Revision History:
  11. --*/
  12. #include "precomp.h"
  13. #pragma hdrstop
  14. //
  15. // The local debug trace level
  16. //
  17. #define Dbg (DEBUG_TRACE_EA)
  18. #ifdef ALLOC_PRAGMA
  19. #pragma alloc_text(PAGE, RxCommonQueryEa)
  20. #pragma alloc_text(PAGE, RxCommonSetEa)
  21. #pragma alloc_text(PAGE, RxCommonQuerySecurity)
  22. #pragma alloc_text(PAGE, RxCommonSetSecurity)
  23. #endif
  24. typedef
  25. NTSTATUS
  26. (NTAPI *PRX_MISC_OP_ROUTINE) (
  27. RXCOMMON_SIGNATURE);
  28. NTSTATUS
  29. RxpCommonMiscOp(
  30. RXCOMMON_SIGNATURE,
  31. PRX_MISC_OP_ROUTINE pMiscOpRoutine)
  32. {
  33. NTSTATUS Status;
  34. RxCaptureFcb;
  35. NODE_TYPE_CODE TypeOfOpen = NodeType(capFcb);
  36. if ((TypeOfOpen != RDBSS_NTC_STORAGE_TYPE_FILE) &&
  37. (TypeOfOpen != RDBSS_NTC_STORAGE_TYPE_DIRECTORY)) {
  38. RxDbgTrace(-1, Dbg, ("RxpCommonMiscOp -> %08lx\n", STATUS_INVALID_PARAMETER));
  39. return STATUS_INVALID_PARAMETER;
  40. }
  41. if (!FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)) {
  42. RxDbgTrace(0, Dbg, ("RxpCommonMiscOp: Set Ea must be waitable....posting\n", 0));
  43. Status = RxFsdPostRequest( RxContext );
  44. RxDbgTrace(-1, Dbg, ("RxpCommonMiscOp -> %08lx\n", Status ));
  45. return Status;
  46. }
  47. Status = RxAcquireExclusiveFcb( RxContext, capFcb );
  48. if (Status != STATUS_SUCCESS) {
  49. RxDbgTrace(-1, Dbg, ("RxpCommonMiscOp -> Error Acquiring Fcb %08lx\n", Status ));
  50. return Status;
  51. }
  52. try {
  53. Status = (*pMiscOpRoutine)(
  54. RxContext);
  55. } finally {
  56. DebugUnwind( *pMiscOpRoutine );
  57. RxReleaseFcb( RxContext, capFcb );
  58. RxDbgTrace(-1, Dbg, ("RxpCommonMiscOp -> %08lx\n", Status));
  59. }
  60. return Status;
  61. }
  62. NTSTATUS
  63. RxpCommonQuerySecurity(
  64. RXCOMMON_SIGNATURE)
  65. {
  66. NTSTATUS Status;
  67. RxCaptureRequestPacket;
  68. RxCaptureFcb;
  69. RxCaptureParamBlock;
  70. PUCHAR Buffer;
  71. ULONG UserBufferLength;
  72. UserBufferLength = capPARAMS->Parameters.QuerySecurity.Length;
  73. RxContext->QuerySecurity.SecurityInformation =
  74. capPARAMS->Parameters.QuerySecurity.SecurityInformation;
  75. RxLockUserBuffer(
  76. RxContext,
  77. IoModifyAccess,
  78. UserBufferLength );
  79. //lock before map so that map will get userbuffer instead of assoc buffer
  80. Buffer = RxNewMapUserBuffer( RxContext );
  81. RxDbgTrace(0, Dbg, ("RxCommonQuerySecurity -> Buffer = %08lx\n", Buffer));
  82. if ((Buffer != NULL) ||
  83. (UserBufferLength == 0)) {
  84. RxContext->Info.Buffer = Buffer;
  85. RxContext->Info.LengthRemaining = UserBufferLength;
  86. MINIRDR_CALL(
  87. Status,
  88. RxContext,
  89. capFcb->MRxDispatch,
  90. MRxQuerySdInfo,
  91. (RxContext));
  92. capReqPacket->IoStatus.Information = RxContext->InformationToReturn;
  93. } else {
  94. capReqPacket->IoStatus.Information = 0;
  95. Status = STATUS_INSUFFICIENT_RESOURCES;
  96. }
  97. return Status;
  98. }
  99. NTSTATUS
  100. RxCommonQuerySecurity ( RXCOMMON_SIGNATURE )
  101. /*++
  102. Routine Description:
  103. This is the common routine for querying File ea called by both
  104. the fsd and fsp threads.
  105. Arguments:
  106. Irp - Supplies the Irp being processed
  107. Return Value:
  108. RXSTATUS - The return status for the operation
  109. STATUS_NO_MORE_EAS(warning):
  110. If the index of the last Ea + 1 == EaIndex.
  111. STATUS_NONEXISTENT_EA_ENTRY(error):
  112. EaIndex > index of last Ea + 1.
  113. STATUS_EAS_NOT_SUPPORTED(error):
  114. Attempt to do an operation to a server that did not negotiate
  115. "KNOWS_EAS".
  116. STATUS_BUFFER_OVERFLOW(warning):
  117. User did not supply an EaList, at least one but not all Eas
  118. fit in the buffer.
  119. STATUS_BUFFER_TOO_SMALL(error):
  120. Could not fit a single Ea in the buffer.
  121. User supplied an EaList and not all Eas fit in the buffer.
  122. STATUS_NO_EAS_ON_FILE(error):
  123. There were no eas on the file.
  124. STATUS_SUCCESS:
  125. All Eas fit in the buffer.
  126. If STATUS_BUFFER_TOO_SMALL is returned then IoStatus.Information is set
  127. to 0.
  128. Note:
  129. This code assumes that this is a buffered I/O operation. If it is ever
  130. implemented as a non buffered operation, then we have to put code to map
  131. in the users buffer here.
  132. --*/
  133. {
  134. NTSTATUS Status;
  135. RxCaptureRequestPacket;
  136. RxCaptureParamBlock;
  137. PAGED_CODE();
  138. RxDbgTrace(+1, Dbg, ("RxCommonQuerySecurity...\n", 0));
  139. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  140. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  141. RxDbgTrace( 0, Dbg, (" ->UserBuffer = %08lx\n", capReqPacket->UserBuffer ));
  142. RxDbgTrace( 0, Dbg, (" ->Length = %08lx\n", capPARAMS->Parameters.QuerySecurity.Length ));
  143. RxDbgTrace( 0, Dbg, (" ->SecurityInfo = %08lx\n", capPARAMS->Parameters.QuerySecurity.SecurityInformation ));
  144. Status = RxpCommonMiscOp(
  145. RxContext,
  146. RxpCommonQuerySecurity);
  147. RxDbgTrace(-1, Dbg, ("RxCommonQuerySecurity -> %08lx\n", Status));
  148. return Status;
  149. }
  150. NTSTATUS
  151. RxpCommonSetSecurity(
  152. RXCOMMON_SIGNATURE)
  153. {
  154. NTSTATUS Status;
  155. RxCaptureRequestPacket;
  156. RxCaptureFcb;
  157. RxCaptureParamBlock;
  158. RxContext->SetSecurity.SecurityInformation =
  159. capPARAMS->Parameters.SetSecurity.SecurityInformation;
  160. RxContext->SetSecurity.SecurityDescriptor =
  161. capPARAMS->Parameters.SetSecurity.SecurityDescriptor;
  162. RxDbgTrace(0, Dbg, ("RxCommonSetSecurity -> Descr/Info = %08lx/%08lx\n",
  163. RxContext->SetSecurity.SecurityDescriptor,
  164. RxContext->SetSecurity.SecurityInformation ));
  165. MINIRDR_CALL(
  166. Status,
  167. RxContext,
  168. capFcb->MRxDispatch,
  169. MRxSetSdInfo,
  170. (RxContext));
  171. return Status;
  172. }
  173. NTSTATUS
  174. RxCommonSetSecurity ( RXCOMMON_SIGNATURE )
  175. /*++
  176. Routine Description:
  177. This routine implements the common Set Ea File Api called by the
  178. the Fsd and Fsp threads
  179. Arguments:
  180. Irp - Supplies the Irp to process
  181. Return Value:
  182. RXSTATUS - The appropriate status for the Irp
  183. --*/
  184. {
  185. NTSTATUS Status;
  186. RxCaptureRequestPacket;
  187. RxCaptureFcb;
  188. RxCaptureFobx;
  189. RxCaptureParamBlock;
  190. RxCaptureFileObject;
  191. NODE_TYPE_CODE TypeOfOpen = NodeType(capFcb);
  192. PAGED_CODE();
  193. RxDbgTrace(+1, Dbg, ("RxCommonSetSecurity...\n", 0));
  194. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  195. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  196. Status = RxpCommonMiscOp(
  197. RxContext,
  198. RxpCommonSetSecurity);
  199. RxDbgTrace(-1, Dbg, ("RxCommonSetSecurity -> %08lx\n", Status));
  200. return Status;
  201. }
  202. NTSTATUS
  203. RxpCommonQueryEa(
  204. RXCOMMON_SIGNATURE)
  205. {
  206. NTSTATUS Status;
  207. RxCaptureRequestPacket;
  208. RxCaptureFcb;
  209. RxCaptureParamBlock;
  210. PUCHAR Buffer;
  211. ULONG UserBufferLength;
  212. UserBufferLength = capPARAMS->Parameters.QueryEa.Length;
  213. RxContext->QueryEa.UserEaList = capPARAMS->Parameters.QueryEa.EaList;
  214. RxContext->QueryEa.UserEaListLength = capPARAMS->Parameters.QueryEa.EaListLength;
  215. RxContext->QueryEa.UserEaIndex = capPARAMS->Parameters.QueryEa.EaIndex;
  216. RxContext->QueryEa.RestartScan = BooleanFlagOn(capPARAMS->Flags, SL_RESTART_SCAN);
  217. RxContext->QueryEa.ReturnSingleEntry = BooleanFlagOn(capPARAMS->Flags, SL_RETURN_SINGLE_ENTRY);
  218. RxContext->QueryEa.IndexSpecified = BooleanFlagOn(capPARAMS->Flags, SL_INDEX_SPECIFIED);
  219. RxLockUserBuffer( RxContext, IoModifyAccess, UserBufferLength );
  220. //lock before map so that map will get userbuffer instead of assoc buffer
  221. Buffer = RxNewMapUserBuffer( RxContext );
  222. if ((Buffer != NULL) ||
  223. (UserBufferLength == 0)) {
  224. RxDbgTrace(0, Dbg, ("RxCommonQueryEa -> Buffer = %08lx\n", Buffer));
  225. RxContext->Info.Buffer = Buffer;
  226. RxContext->Info.LengthRemaining = UserBufferLength;
  227. MINIRDR_CALL(
  228. Status,
  229. RxContext,
  230. capFcb->MRxDispatch,
  231. MRxQueryEaInfo,
  232. (RxContext));
  233. //In addition to manipulating the LengthRemaining and filling the buffer,
  234. // the minirdr also updates the fileindex (capFobx->OffsetOfNextEaToReturn)
  235. capReqPacket->IoStatus.Information = capPARAMS->Parameters.QueryEa.Length - RxContext->Info.LengthRemaining;
  236. } else {
  237. capReqPacket->IoStatus.Information = 0;
  238. Status = STATUS_INSUFFICIENT_RESOURCES;
  239. }
  240. return Status;
  241. }
  242. NTSTATUS
  243. RxCommonQueryEa ( RXCOMMON_SIGNATURE )
  244. /*++
  245. Routine Description:
  246. This is the common routine for querying File ea called by both
  247. the fsd and fsp threads.
  248. Arguments:
  249. Irp - Supplies the Irp being processed
  250. Return Value:
  251. RXSTATUS - The return status for the operation
  252. STATUS_NO_MORE_EAS(warning):
  253. If the index of the last Ea + 1 == EaIndex.
  254. STATUS_NONEXISTENT_EA_ENTRY(error):
  255. EaIndex > index of last Ea + 1.
  256. STATUS_EAS_NOT_SUPPORTED(error):
  257. Attempt to do an operation to a server that did not negotiate
  258. "KNOWS_EAS".
  259. STATUS_BUFFER_OVERFLOW(warning):
  260. User did not supply an EaList, at least one but not all Eas
  261. fit in the buffer.
  262. STATUS_BUFFER_TOO_SMALL(error):
  263. Could not fit a single Ea in the buffer.
  264. User supplied an EaList and not all Eas fit in the buffer.
  265. STATUS_NO_EAS_ON_FILE(error):
  266. There were no eas on the file.
  267. STATUS_SUCCESS:
  268. All Eas fit in the buffer.
  269. If STATUS_BUFFER_TOO_SMALL is returned then IoStatus.Information is set
  270. to 0.
  271. Note:
  272. This code assumes that this is a buffered I/O operation. If it is ever
  273. implemented as a non buffered operation, then we have to put code to map
  274. in the users buffer here.
  275. --*/
  276. {
  277. NTSTATUS Status;
  278. RxCaptureRequestPacket;
  279. RxCaptureParamBlock;
  280. PAGED_CODE();
  281. RxDbgTrace(+1, Dbg, ("RxCommonQueryEa...\n", 0));
  282. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  283. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  284. RxDbgTrace( 0, Dbg, (" ->SystemBuffer = %08lx\n", capReqPacket->AssociatedIrp.SystemBuffer ));
  285. RxDbgTrace( 0, Dbg, (" ->UserBuffer = %08lx\n", capReqPacket->UserBuffer ));
  286. RxDbgTrace( 0, Dbg, (" ->Length = %08lx\n", capPARAMS->Parameters.QueryEa.Length ));
  287. RxDbgTrace( 0, Dbg, (" ->EaList = %08lx\n", capPARAMS->Parameters.QueryEa.EaList ));
  288. RxDbgTrace( 0, Dbg, (" ->EaListLength = %08lx\n", capPARAMS->Parameters.QueryEa.EaListLength ));
  289. RxDbgTrace( 0, Dbg, (" ->EaIndex = %08lx\n", capPARAMS->Parameters.QueryEa.EaIndex ));
  290. RxDbgTrace( 0, Dbg, (" ->RestartScan = %08lx\n", FlagOn(capPARAMS->Flags, SL_RESTART_SCAN)));
  291. RxDbgTrace( 0, Dbg, (" ->ReturnSingleEntry = %08lx\n", FlagOn(capPARAMS->Flags, SL_RETURN_SINGLE_ENTRY)));
  292. RxDbgTrace( 0, Dbg, (" ->IndexSpecified = %08lx\n", FlagOn(capPARAMS->Flags, SL_INDEX_SPECIFIED)));
  293. Status = RxpCommonMiscOp(
  294. RxContext,
  295. RxpCommonQueryEa);
  296. RxDbgTrace(-1, Dbg, ("RxCommonQueryEa -> %08lx\n", Status));
  297. return Status;
  298. }
  299. NTSTATUS
  300. RxpCommonSetEa(
  301. RXCOMMON_SIGNATURE)
  302. {
  303. NTSTATUS Status;
  304. RxCaptureRequestPacket;
  305. RxCaptureFcb;
  306. RxCaptureParamBlock;
  307. RxCaptureFileObject;
  308. PUCHAR Buffer;
  309. ULONG UserBufferLength;
  310. // Reference our input parameters to make things easier
  311. UserBufferLength = capPARAMS->Parameters.SetEa.Length;
  312. capFileObject->Flags |= FO_FILE_MODIFIED;
  313. RxLockUserBuffer(
  314. RxContext,
  315. IoModifyAccess,
  316. UserBufferLength );
  317. //unless we lock first, rxmap actually gets the systembuffer!
  318. Buffer = RxNewMapUserBuffer( RxContext );
  319. if ((Buffer != NULL) ||
  320. (UserBufferLength == 0)) {
  321. ULONG ErrorOffset;
  322. RxDbgTrace(0, Dbg, ("RxCommonSetEa -> Buffer = %08lx\n", Buffer));
  323. //
  324. // Check the validity of the buffer with the new eas.
  325. //
  326. Status = IoCheckEaBufferValidity(
  327. (PFILE_FULL_EA_INFORMATION) Buffer,
  328. UserBufferLength,
  329. &ErrorOffset );
  330. if (!NT_SUCCESS( Status )) {
  331. capReqPacket->IoStatus.Information = ErrorOffset;
  332. return Status;
  333. }
  334. } else {
  335. capReqPacket->IoStatus.Information = 0;
  336. return STATUS_INSUFFICIENT_RESOURCES;
  337. }
  338. capReqPacket->IoStatus.Information = 0;
  339. RxContext->Info.Buffer = Buffer;
  340. RxContext->Info.Length = UserBufferLength;
  341. MINIRDR_CALL(
  342. Status,
  343. RxContext,
  344. capFcb->MRxDispatch,
  345. MRxSetEaInfo,
  346. (RxContext));
  347. return Status;
  348. }
  349. NTSTATUS
  350. RxCommonSetEa ( RXCOMMON_SIGNATURE )
  351. /*++
  352. Routine Description:
  353. This routine implements the common Set Ea File Api called by the
  354. the Fsd and Fsp threads
  355. Arguments:
  356. Irp - Supplies the Irp to process
  357. Return Value:
  358. RXSTATUS - The appropriate status for the Irp
  359. --*/
  360. {
  361. NTSTATUS Status;
  362. RxCaptureRequestPacket;
  363. RxCaptureParamBlock;
  364. PAGED_CODE();
  365. RxDbgTrace(+1, Dbg, ("RxCommonSetEa...\n", 0));
  366. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  367. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  368. RxDbgTrace( 0, Dbg, (" ->SystemBuffer = %08lx\n", capReqPacket->UserBuffer ));
  369. RxDbgTrace( 0, Dbg, (" ->Length = %08lx\n", capPARAMS->Parameters.SetEa.Length ));
  370. Status = RxpCommonMiscOp(
  371. RxContext,
  372. RxpCommonSetEa);
  373. RxDbgTrace(-1, Dbg, ("RxCommonSetEa -> %08lx\n", Status));
  374. return Status;
  375. }
  376. NTSTATUS
  377. RxpCommonQueryQuotaInformation(
  378. RXCOMMON_SIGNATURE)
  379. {
  380. NTSTATUS Status;
  381. RxCaptureRequestPacket;
  382. RxCaptureParamBlock;
  383. RxCaptureFcb;
  384. PUCHAR Buffer;
  385. ULONG UserBufferLength;
  386. UserBufferLength = capPARAMS->Parameters.QueryQuota.Length;
  387. RxContext->QueryQuota.SidList = capPARAMS->Parameters.QueryQuota.SidList;
  388. RxContext->QueryQuota.SidListLength = capPARAMS->Parameters.QueryQuota.SidListLength;
  389. RxContext->QueryQuota.StartSid = capPARAMS->Parameters.QueryQuota.StartSid;
  390. RxContext->QueryQuota.Length = capPARAMS->Parameters.QueryQuota.Length;
  391. RxContext->QueryQuota.RestartScan = BooleanFlagOn(capPARAMS->Flags, SL_RESTART_SCAN);
  392. RxContext->QueryQuota.ReturnSingleEntry = BooleanFlagOn(capPARAMS->Flags, SL_RETURN_SINGLE_ENTRY);
  393. RxContext->QueryQuota.IndexSpecified = BooleanFlagOn(capPARAMS->Flags, SL_INDEX_SPECIFIED);
  394. RxLockUserBuffer(
  395. RxContext,
  396. IoModifyAccess,
  397. UserBufferLength );
  398. //lock before map so that map will get userbuffer instead of assoc buffer
  399. Buffer = RxNewMapUserBuffer( RxContext );
  400. if ((Buffer != NULL) ||
  401. (UserBufferLength == 0)) {
  402. RxDbgTrace(0, Dbg, ("RxCommonQueryQuota -> Buffer = %08lx\n", Buffer));
  403. RxContext->Info.Buffer = Buffer;
  404. RxContext->Info.LengthRemaining = UserBufferLength;
  405. MINIRDR_CALL(
  406. Status,
  407. RxContext,
  408. capFcb->MRxDispatch,
  409. MRxQueryQuotaInfo,
  410. (RxContext));
  411. capReqPacket->IoStatus.Information = RxContext->Info.LengthRemaining;
  412. } else {
  413. capReqPacket->IoStatus.Information = 0;
  414. Status = STATUS_INSUFFICIENT_RESOURCES;
  415. }
  416. return Status;
  417. }
  418. NTSTATUS
  419. RxCommonQueryQuotaInformation(
  420. RXCOMMON_SIGNATURE)
  421. {
  422. NTSTATUS Status;
  423. RxCaptureRequestPacket;
  424. RxCaptureParamBlock;
  425. PAGED_CODE();
  426. RxDbgTrace(+1, Dbg, ("RxCommonQueryQueryQuotaInformation...\n", 0));
  427. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  428. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  429. RxDbgTrace( 0, Dbg, (" ->SystemBuffer = %08lx\n", capReqPacket->AssociatedIrp.SystemBuffer ));
  430. RxDbgTrace( 0, Dbg, (" ->UserBuffer = %08lx\n", capReqPacket->UserBuffer ));
  431. RxDbgTrace( 0, Dbg, (" ->Length = %08lx\n", capPARAMS->Parameters.QueryQuota.Length ));
  432. RxDbgTrace( 0, Dbg, (" ->StartSid = %08lx\n", capPARAMS->Parameters.QueryQuota.StartSid ));
  433. RxDbgTrace( 0, Dbg, (" ->SidList = %08lx\n", capPARAMS->Parameters.QueryQuota.SidList ));
  434. RxDbgTrace( 0, Dbg, (" ->SidListLength = %08lx\n", capPARAMS->Parameters.QueryQuota.SidListLength ));
  435. RxDbgTrace( 0, Dbg, (" ->RestartScan = %08lx\n", FlagOn(capPARAMS->Flags, SL_RESTART_SCAN)));
  436. RxDbgTrace( 0, Dbg, (" ->ReturnSingleEntry = %08lx\n", FlagOn(capPARAMS->Flags, SL_RETURN_SINGLE_ENTRY)));
  437. RxDbgTrace( 0, Dbg, (" ->IndexSpecified = %08lx\n", FlagOn(capPARAMS->Flags, SL_INDEX_SPECIFIED)));
  438. Status = RxpCommonMiscOp(
  439. RxContext,
  440. RxpCommonQueryQuotaInformation);
  441. return Status;
  442. }
  443. NTSTATUS
  444. RxpCommonSetQuotaInformation(
  445. RXCOMMON_SIGNATURE)
  446. {
  447. NTSTATUS Status;
  448. RxCaptureRequestPacket;
  449. RxCaptureParamBlock;
  450. RxCaptureFcb;
  451. PUCHAR Buffer;
  452. ULONG UserBufferLength;
  453. PAGED_CODE();
  454. UserBufferLength = capPARAMS->Parameters.SetQuota.Length;
  455. RxLockUserBuffer(
  456. RxContext,
  457. IoModifyAccess,
  458. UserBufferLength );
  459. //lock before map so that map will get userbuffer instead of assoc buffer
  460. Buffer = RxNewMapUserBuffer( RxContext );
  461. if ((Buffer != NULL) ||
  462. (UserBufferLength == 0)) {
  463. RxDbgTrace(0, Dbg, ("RxCommonQueryQuota -> Buffer = %08lx\n", Buffer));
  464. RxContext->Info.Buffer = Buffer;
  465. RxContext->Info.LengthRemaining = UserBufferLength;
  466. MINIRDR_CALL(
  467. Status,
  468. RxContext,
  469. capFcb->MRxDispatch,
  470. MRxSetQuotaInfo,
  471. (RxContext));
  472. } else {
  473. Status = STATUS_INSUFFICIENT_RESOURCES;
  474. }
  475. return Status;
  476. }
  477. NTSTATUS
  478. RxCommonSetQuotaInformation(
  479. RXCOMMON_SIGNATURE)
  480. {
  481. NTSTATUS Status;
  482. RxCaptureRequestPacket;
  483. RxCaptureParamBlock;
  484. PAGED_CODE();
  485. RxDbgTrace(+1, Dbg, ("RxCommonSetQuotaInformation...\n", 0));
  486. RxDbgTrace( 0, Dbg, (" Wait = %08lx\n", FlagOn(RxContext->Flags, RX_CONTEXT_FLAG_WAIT)));
  487. RxDbgTrace( 0, Dbg, (" Irp = %08lx\n", capReqPacket ));
  488. Status = RxpCommonMiscOp(
  489. RxContext,
  490. RxpCommonSetQuotaInformation);
  491. return Status;
  492. }
  493.