mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-30 19:48:38 -05:00 
			
		
		
		
	tst: ntptfs: WslFeatures
This commit is contained in:
		| @@ -153,13 +153,6 @@ static NTSTATUS CreateEx(FSP_FILE_SYSTEM *FileSystem, | ||||
|     UINT32 MaximumAccess = IsDirectory ? GrantedAccess : MAXIMUM_ALLOWED; | ||||
|     NTSTATUS Result; | ||||
|  | ||||
|     if (ExtraBufferIsReparsePoint) | ||||
|     { | ||||
|         /* no support for WSL */ | ||||
|         Result = STATUS_INVALID_PARAMETER; | ||||
|         goto exit; | ||||
|     } | ||||
|  | ||||
|     CreateOptions &= | ||||
|         FILE_DIRECTORY_FILE | | ||||
|         FILE_NON_DIRECTORY_FILE | | ||||
| @@ -198,6 +191,21 @@ static NTSTATUS CreateEx(FSP_FILE_SYSTEM *FileSystem, | ||||
|     if (!NT_SUCCESS(Result)) | ||||
|         goto exit; | ||||
|  | ||||
|     if (ExtraBufferIsReparsePoint) | ||||
|     { | ||||
|         /* this can happen on a WSL mount */ | ||||
|         Result = LfsFsControlFile( | ||||
|             Handle, | ||||
|             FSCTL_SET_REPARSE_POINT, | ||||
|             ExtraBuffer, | ||||
|             (ULONG)ExtraLength, | ||||
|             0, | ||||
|             0, | ||||
|             &ExtraLength); | ||||
|         if (!NT_SUCCESS(Result)) | ||||
|             goto exit; | ||||
|     } | ||||
|  | ||||
|     Result = LfsGetFileInfo(Handle, Ptfs->RootPrefixLength, FileInfo); | ||||
|     if (!NT_SUCCESS(Result)) | ||||
|         goto exit; | ||||
| @@ -1154,6 +1162,8 @@ NTSTATUS PtfsCreate( | ||||
|     VolumeParams.PassQueryDirectoryPattern = 1; | ||||
|     VolumeParams.FlushAndPurgeOnCleanup = (FsAttributeMask & PtfsFlushAndPurgeOnCleanup) ? | ||||
|         1 : 0; | ||||
|     VolumeParams.WslFeatures = (FsAttributeMask & PtfsWslFeatures) ? | ||||
|         1 : 0; | ||||
|     VolumeParams.AllowOpenInKernelMode = 1; | ||||
|     VolumeParams.RejectIrpPriorToTransact0 = 1; | ||||
|     VolumeParams.UmFileContextIsUserContext2 = 1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user