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.

158 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1989 - 1999 Microsoft Corporation
  3. Module Name:
  4. fsctl.c
  5. Abstract:
  6. This module implements the mini redirector call down routines pertaining to
  7. file system control(FSCTL) and Io Device Control (IOCTL) operations on file
  8. system objects.
  9. --*/
  10. #include "precomp.h"
  11. #pragma hdrstop
  12. #ifdef ALLOC_PRAGMA
  13. #pragma alloc_text(PAGE, MRxSmbFsCtl)
  14. #pragma alloc_text(PAGE, MRxSmbNotifyChangeDirectory)
  15. #pragma alloc_text(PAGE, MRxSmbIoCtl)
  16. #endif
  17. //
  18. // The local debug trace level
  19. //
  20. RXDT_DefineCategory(FSCTRL);
  21. #define Dbg (DEBUG_TRACE_FSCTRL)
  22. NTSTATUS
  23. MRxSmbCoreIoCtl(
  24. SMBPSE_ORDINARY_EXCHANGE_ARGUMENT_SIGNATURE);
  25. NTSTATUS
  26. MRxSmbFsCtl(
  27. IN OUT PRX_CONTEXT RxContext)
  28. /*++
  29. Routine Description:
  30. This routine performs an FSCTL operation (remote) on a file across the network
  31. Arguments:
  32. RxContext - the RDBSS context
  33. Return Value:
  34. RXSTATUS - The return status for the operation
  35. Notes:
  36. The FSCTL's handled by a mini rdr can be classified into one of two categories.
  37. In the first category are those FSCTL's whose implementation are shared between
  38. RDBSS and the mini rdr's and in the second category are those FSCTL's which
  39. are totally implemented by the mini rdr's. To this a third category can be
  40. added, i.e., those FSCTL's which should never be seen by the mini rdr's. The
  41. third category is solely intended as a debugging aid.
  42. The FSCTL's handled by a mini rdr can be classified based on functionality
  43. --*/
  44. {
  45. RxCaptureFobx;
  46. RxCaptureFcb;
  47. NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
  48. PLOWIO_CONTEXT pLowIoContext = &RxContext->LowIoContext;
  49. ULONG FsControlCode = pLowIoContext->ParamsFor.FsCtl.FsControlCode;
  50. PAGED_CODE();
  51. RxDbgTrace(+1, Dbg, ("MRxSmbFsCtl...\n", 0));
  52. RxDbgTrace( 0, Dbg, ("MRxSmbFsCtl = %08lx\n", FsControlCode));
  53. RxDbgTrace(-1, Dbg, ("MRxSmbFsCtl -> %08lx\n", Status ));
  54. return Status;
  55. }
  56. NTSTATUS
  57. MRxSmbNotifyChangeDirectory(
  58. IN OUT PRX_CONTEXT RxContext)
  59. /*++
  60. Routine Description:
  61. This routine performs a directory change notification operation
  62. Arguments:
  63. RxContext - the RDBSS context
  64. Return Value:
  65. RXSTATUS - The return status for the operation
  66. Notes:
  67. A directory change notification opertaion is an asychronous operation. It
  68. consists of sending a SMB requesting change notification whose response is
  69. obtained when the desired change is affected on the server.
  70. --*/
  71. {
  72. NTSTATUS Status = STATUS_NOT_IMPLEMENTED;
  73. RxDbgTrace(+1, Dbg, ("MRxNotifyChangeDirectory...Entry\n", 0));
  74. RxDbgTrace(-1, Dbg, ("MRxSmbNotifyChangeDirectory -> %08lx\n", Status ));
  75. return Status;
  76. }
  77. NTSTATUS
  78. MRxSmbIoCtl(
  79. IN OUT PRX_CONTEXT RxContext)
  80. /*++
  81. Routine Description:
  82. This routine performs an IOCTL operation. Currently, no calls are remoted; in
  83. fact, the only call accepted is for debugging.
  84. Arguments:
  85. RxContext - the RDBSS context
  86. Return Value:
  87. RXSTATUS - The return status for the operation
  88. Notes:
  89. --*/
  90. {
  91. NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
  92. PLOWIO_CONTEXT pLowIoContext = &RxContext->LowIoContext;
  93. ULONG IoControlCode = pLowIoContext->ParamsFor.IoCtl.IoControlCode;
  94. PAGED_CODE();
  95. RxDbgTrace(+1, Dbg, ("MRxSmbIoCtl...\n", 0));
  96. RxDbgTrace( 0, Dbg, ("MRxSmbIoCtl IOCTL: = %08lx\n", IoControlCode));
  97. RxDbgTrace(-1, Dbg, ("MRxSmbIoCtl Status -> %08lx\n", Status ));
  98. return Status;
  99. }
  100.