From fee75590a8a8017215cf22ea5f7854c92a21b2e5 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Sun, 21 Aug 2016 23:36:09 -0700 Subject: [PATCH] sys,dll: rename VolumeParams::ReparsePoints* fields --- inc/winfsp/fsctl.h | 4 ++-- inc/winfsp/winfsp.h | 10 +++++----- src/dll/fs.c | 2 +- src/dll/fsop.c | 8 ++++---- src/dll/fuse/fuse.c | 4 ++-- src/sys/fsctl.c | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/winfsp/fsctl.h b/inc/winfsp/fsctl.h index 263c2ceb..ee3b18fa 100644 --- a/inc/winfsp/fsctl.h +++ b/inc/winfsp/fsctl.h @@ -127,8 +127,8 @@ typedef struct UINT32 UnicodeOnDisk:1; /* file system supports Unicode in file names */ UINT32 PersistentAcls:1; /* file system preserves and enforces access control lists */ UINT32 ReparsePoints:1; /* file system supports reparse points */ - UINT32 ReparsePointsPrivilegeCheck:1; /* file system performs reparse point privilege checks */ - UINT32 ReparsePointsSymbolicLinks:1; /* file system supports only symbolic link reparse points */ + UINT32 ReparsePointsAccessCheck:1; /* file system performs reparse point access checks */ + UINT32 ReparsePointsSymlinkOnly:1; /* file system supports only symbolic link reparse points */ UINT32 NamedStreams:1; /* file system supports named streams (!!!: unimplemented) */ UINT32 HardLinks:1; /* unimplemented; set to 0 */ UINT32 ExtendedAttributes:1; /* unimplemented; set to 0 */ diff --git a/inc/winfsp/winfsp.h b/inc/winfsp/winfsp.h index 57cb34d5..e8de888e 100644 --- a/inc/winfsp/winfsp.h +++ b/inc/winfsp/winfsp.h @@ -702,10 +702,10 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE * Get reparse point. * * The behavior of this function depends on the value of FSP_FSCTL_VOLUME_PARAMS :: - * ReparsePointsSymbolicLinksOnly. If the value of ReparsePointsSymbolicLinksOnly + * ReparsePointsSymlinkOnly. If the value of ReparsePointsSymlinkOnly * is FALSE the file system supports full reparse points and this function is expected * to fill the buffer with a full reparse point. If the value of - * ReparsePointsSymbolicLinksOnly is TRUE the file system supports symbolic links only + * ReparsePointsSymlinkOnly is TRUE the file system supports symbolic links only * as reparse points and this function is expected to fill the buffer with the symbolic * link path. * @@ -736,10 +736,10 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE * Set reparse point. * * The behavior of this function depends on the value of FSP_FSCTL_VOLUME_PARAMS :: - * ReparsePointsSymbolicLinksOnly. If the value of ReparsePointsSymbolicLinksOnly + * ReparsePointsSymlinkOnly. If the value of ReparsePointsSymlinkOnly * is FALSE the file system supports full reparse points and this function is expected * to set the reparse point contained in the buffer. If the value of - * ReparsePointsSymbolicLinksOnly is TRUE the file system supports symbolic links only + * ReparsePointsSymlinkOnly is TRUE the file system supports symbolic links only * as reparse points and this function is expected to set the symbolic link path contained * in the buffer. * @@ -797,7 +797,7 @@ typedef struct _FSP_FILE_SYSTEM UINT32 DebugLog; FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY OpGuardStrategy; SRWLOCK OpGuardLock; - UINT32 ReparsePointsSymbolicLinks:1; + UINT32 ReparsePointsSymlinkOnly:1; } FSP_FILE_SYSTEM; /** * Create a file system object. diff --git a/src/dll/fs.c b/src/dll/fs.c index fdf92194..5d127625 100644 --- a/src/dll/fs.c +++ b/src/dll/fs.c @@ -106,7 +106,7 @@ FSP_API NTSTATUS FspFileSystemCreate(PWSTR DevicePath, FileSystem->EnterOperation = FspFileSystemOpEnter; FileSystem->LeaveOperation = FspFileSystemOpLeave; - FileSystem->ReparsePointsSymbolicLinks = VolumeParams->ReparsePointsSymbolicLinks; + FileSystem->ReparsePointsSymlinkOnly = VolumeParams->ReparsePointsSymlinkOnly; *PFileSystem = FileSystem; diff --git a/src/dll/fsop.c b/src/dll/fsop.c index 5b3ba09d..f0f88268 100644 --- a/src/dll/fsop.c +++ b/src/dll/fsop.c @@ -897,7 +897,7 @@ FSP_API NTSTATUS FspFileSystemOpFileSystemControl(FSP_FILE_SYSTEM *FileSystem, ReparseData = (PREPARSE_DATA_BUFFER)Response->Buffer; memset(ReparseData, 0, sizeof *ReparseData); - if (FileSystem->ReparsePointsSymbolicLinks) + if (FileSystem->ReparsePointsSymlinkOnly) { Size = FSP_FSCTL_TRANSACT_RSP_SIZEMAX - FIELD_OFFSET(FSP_FSCTL_TRANSACT_RSP, Buffer) - FIELD_OFFSET(REPARSE_DATA_BUFFER, SymbolicLinkReparseBuffer.PathBuffer); @@ -950,7 +950,7 @@ FSP_API NTSTATUS FspFileSystemOpFileSystemControl(FSP_FILE_SYSTEM *FileSystem, ReparseData = (PREPARSE_DATA_BUFFER) (Request->Buffer + Request->Req.FileSystemControl.Buffer.Offset); - if (FileSystem->ReparsePointsSymbolicLinks) + if (FileSystem->ReparsePointsSymlinkOnly) { Result = FileSystem->Interface->SetReparsePoint(FileSystem, Request, (PVOID)Request->Req.FileSystemControl.UserContext, @@ -1159,7 +1159,7 @@ FSP_API NTSTATUS FspFileSystemResolveReparsePoints(FSP_FILE_SYSTEM *FileSystem, c = *p; *p = '\0'; - if (FileSystem->ReparsePointsSymbolicLinks) + if (FileSystem->ReparsePointsSymlinkOnly) { Size = FSP_FSCTL_TRANSACT_PATH_SIZEMAX; Result = GetReparsePointByName(FileSystem, Context, TargetPath, @@ -1188,7 +1188,7 @@ FSP_API NTSTATUS FspFileSystemResolveReparsePoints(FSP_FILE_SYSTEM *FileSystem, if (0 == --MaxTries) return STATUS_REPARSE_POINT_NOT_RESOLVED; - if (FileSystem->ReparsePointsSymbolicLinks) + if (FileSystem->ReparsePointsSymlinkOnly) TargetLink = ReparseData->SymbolicLinkReparseBuffer.PathBuffer; else { diff --git a/src/dll/fuse/fuse.c b/src/dll/fuse/fuse.c index 6d1c5bac..ed7766fe 100644 --- a/src/dll/fuse/fuse.c +++ b/src/dll/fuse/fuse.c @@ -503,8 +503,8 @@ FSP_FUSE_API struct fuse *fsp_fuse_new(struct fsp_fuse_env *env, opt_data.VolumeParams.CaseSensitiveSearch = !opt_data.CaseInsensitiveSearch; opt_data.VolumeParams.PersistentAcls = TRUE; opt_data.VolumeParams.ReparsePoints = FALSE; /* see FSP_FUSE_HAS_SYMLINKS use below */ - opt_data.VolumeParams.ReparsePointsSymbolicLinks = TRUE; - opt_data.VolumeParams.ReparsePointsPrivilegeCheck = FALSE; + opt_data.VolumeParams.ReparsePointsAccessCheck = FALSE; + opt_data.VolumeParams.ReparsePointsSymlinkOnly = TRUE; opt_data.VolumeParams.NamedStreams = !!opt_data.NamedStreams; opt_data.VolumeParams.ReadOnlyVolume = !!opt_data.ReadOnlyVolume; diff --git a/src/sys/fsctl.c b/src/sys/fsctl.c index d8ec6f33..27fd7d1a 100644 --- a/src/sys/fsctl.c +++ b/src/sys/fsctl.c @@ -130,7 +130,7 @@ static NTSTATUS FspFsvolFileSystemControlReparsePoint( if (IO_REPARSE_TAG_SYMLINK == ReparseData->ReparseTag) { /* NTFS severely limits symbolic links; we will not do that unless our file system asks */ - if (FsvolDeviceExtension->VolumeParams.ReparsePointsPrivilegeCheck) + if (FsvolDeviceExtension->VolumeParams.ReparsePointsAccessCheck) { if (KernelMode != Irp->RequestorMode && SeSinglePrivilegeCheck(RtlConvertLongToLuid(SE_CREATE_SYMBOLIC_LINK_PRIVILEGE),