mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-15 00:02:46 -05:00
sys,dll: symbolic link (reparse point) support: WIP
This commit is contained in:
@ -106,6 +106,8 @@ FSP_API NTSTATUS FspFileSystemCreate(PWSTR DevicePath,
|
||||
FileSystem->EnterOperation = FspFileSystemOpEnter;
|
||||
FileSystem->LeaveOperation = FspFileSystemOpLeave;
|
||||
|
||||
FileSystem->ReparsePointsSymbolicLinks = VolumeParams->ReparsePointsSymbolicLinks;
|
||||
|
||||
*PFileSystem = FileSystem;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -906,7 +906,7 @@ FSP_API NTSTATUS FspFileSystemOpFileSystemControl(FSP_FILE_SYSTEM *FileSystem,
|
||||
SymlinkReparseData = (PREPARSE_DATA_BUFFER)Response->Buffer;
|
||||
memset(SymlinkReparseData, 0, sizeof *SymlinkReparseData);
|
||||
|
||||
if (1/*!!!: SymbolicLinksOnly*/)
|
||||
if (FileSystem->ReparsePointsSymbolicLinks)
|
||||
{
|
||||
Size = FSP_FSCTL_TRANSACT_RSP_SIZEMAX - FIELD_OFFSET(FSP_FSCTL_TRANSACT_RSP, Buffer) -
|
||||
sizeof(*SymlinkReparseData);
|
||||
@ -968,7 +968,7 @@ FSP_API NTSTATUS FspFileSystemOpFileSystemControl(FSP_FILE_SYSTEM *FileSystem,
|
||||
SymlinkReparseData = (PREPARSE_DATA_BUFFER)
|
||||
(Request->Buffer + Request->Req.FileSystemControl.Buffer.Offset);
|
||||
|
||||
if (1/*!!!: SymbolicLinksOnly*/)
|
||||
if (FileSystem->ReparsePointsSymbolicLinks)
|
||||
{
|
||||
Result = FileSystem->Interface->SetReparsePoint(FileSystem, Request,
|
||||
(PVOID)Request->Req.FileSystemControl.UserContext,
|
||||
|
@ -449,7 +449,7 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
|
||||
" -o VolumeSerialNumber=N 32-bit wide\n"
|
||||
" -o FileInfoTimeout=N FileInfo/Security/VolumeInfo timeout (millisec)\n"
|
||||
" -o CaseInsensitiveSearch file system supports case-insensitive file names\n"
|
||||
//" -o ReparsePoints file system supports reparse points\n"
|
||||
" -o ReparsePoints file system supports reparse points\n"
|
||||
//" -o NamedStreams file system supports named streams\n"
|
||||
//" -o ReadOnlyVolume file system is read only\n"
|
||||
" --UNC=U --VolumePrefix=U UNC prefix (\\Server\\Share)\n");
|
||||
|
@ -126,7 +126,7 @@ static NTSTATUS FspFsvolFileSystemControlReparsePoint(
|
||||
ReparseTag = ((PREPARSE_DATA_BUFFER)InputBuffer)->ReparseTag;
|
||||
|
||||
/* NTFS severely limits symbolic links; we will not do that unless our file system asks */
|
||||
if (FsvolDeviceExtension->VolumeParams.ReparsePointPrivilegeCheck)
|
||||
if (FsvolDeviceExtension->VolumeParams.ReparsePointsPrivilegeCheck)
|
||||
{
|
||||
if (IO_REPARSE_TAG_SYMLINK == ReparseTag &&
|
||||
KernelMode != Irp->RequestorMode &&
|
||||
|
Reference in New Issue
Block a user