pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


hack to get $ powershell -Command 'Mount-DiskImage -ImagePath ... # working
Posted by Anonymous on Fri 15th Aug 2025 16:27
raw | new post

  1. # hack to get $ powershell -Command 'Mount-DiskImage -ImagePath L:\download\debian-12.4.0-amd64-DVD-1.iso' # working...
  2. diff --git a/daemon/fileinfoutil.c b/daemon/fileinfoutil.c
  3. index 2556c87..cfd9e79 100644
  4. --- a/daemon/fileinfoutil.c
  5. +++ b/daemon/fileinfoutil.c
  6. @@ -221,7 +221,7 @@ void nfs_to_remote_protocol_info(
  7.  
  8.      rpi_out->StructureVersion = 4;
  9.      rpi_out->StructureSize = sizeof(FILE_REMOTE_PROTOCOL_INFORMATION);
  10. -    rpi_out->Protocol = WNNC_NET_RDR2SAMPLE; /* FIXME! */
  11. +    rpi_out->Protocol = WNNC_NET_SMB; /* FIXME! */
  12.  
  13.      /* ToDo: Add pNFS info */
  14.      rpi_out->ProtocolMajorVersion = 4;
  15. @@ -234,7 +234,7 @@ void nfs_to_remote_protocol_info(
  16.       * |REMOTE_PROTOCOL_FLAG_PRIVACY| (krb5p) and
  17.       * |REMOTE_PROTOCOL_FLAG_INTEGRITY| (krb5i) in case of Krb5 auth
  18.       */
  19. -    rpi_out->Flags = 0;
  20. +    rpi_out->Flags = 0;//REMOTE_PROTOCOL_INFO_FLAG_PERSISTENT_HANDLE|REMOTE_PROTOCOL_FLAG_PRIVACY|REMOTE_PROTOCOL_FLAG_INTEGRITY|REMOTE_PROTOCOL_FLAG_LOOPBACK;
  21.  }
  22.  
  23.  #ifdef NFS41_DRIVER_WSL_SUPPORT
  24. diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
  25. index c1a3f2b..cf81d3f 100644
  26. --- a/sys/nfs41sys_fsctl.c
  27. +++ b/sys/nfs41sys_fsctl.c
  28. @@ -895,6 +895,22 @@ NTSTATUS nfs41_FsCtl(
  29.      case FSCTL_DUPLICATE_EXTENTS_TO_FILE:
  30.          status = nfs41_DuplicateData(RxContext);
  31.          break;
  32. +#define FSCTL_SRV_REQUEST_RESUME_KEY                0x140078
  33. +    case FSCTL_SRV_REQUEST_RESUME_KEY:
  34. +        XXCTL_LOWIO_COMPONENT *FsCtl =
  35. +            &RxContext->LowIoContext.ParamsFor.FsCtl;
  36. +
  37. +        DbgP("DUMMY FSCTL_SRV_REQUEST_RESUME_KEY\n");
  38. +        if ((FsCtl->pOutputBuffer == NULL) || (FsCtl->OutputBufferLength < 28)) {
  39. +            status = STATUS_INVALID_USER_BUFFER;
  40. +        }
  41. +        else {
  42. +            (void)memset(FsCtl->pOutputBuffer, 0, 28);
  43. +            RxContext->IoStatusBlock.Information =
  44. +                RxContext->InformationToReturn = 28;
  45. +            status = STATUS_SUCCESS;
  46. +        }
  47. +        break;
  48.      default:
  49.          break;
  50.      }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at