mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-02 17:02:57 -05:00
Compare commits
7 Commits
v1.9B2
...
before-reb
Author | SHA1 | Date | |
---|---|---|---|
a7cfabeff8 | |||
d4a70da611 | |||
50892bfa19 | |||
b2e677a3d3 | |||
9d76495340 | |||
41c604b0fd | |||
28a9534a65 |
@ -1,6 +1,30 @@
|
||||
= Changelog
|
||||
|
||||
|
||||
v1.9 (2021)::
|
||||
|
||||
Changes since v1.8:
|
||||
|
||||
* [NEW] WinFsp now supports file change notifications and cache invalidations. This functionality is offered via the following new API's:
|
||||
** Native API: `FspFileSystemNotify`
|
||||
** FUSE API: `fuse_notify`
|
||||
** .NET API: `FileSystemHost.Notify`
|
||||
|
||||
* [NEW] A native file system (notifyfs) and a .NET file system (notifyfs-dotnet) have been added to showcase the new file change notification API.
|
||||
|
||||
* [NEW] A new WinFsp-FUSE option `FileSecurity` has been added that allows the complete specification of file security descriptors using SDDL. (See GitHub issue https://github.com/rclone/rclone/issues/4717#issuecomment-767723287.)
|
||||
|
||||
* [FIX] The FSD now correctly handles a rare situation where receiving too many CLOSE calls from the OS (e.g. when caching thousands of files) could result in a bogus "insufficient resources" error. (See commit 0af0bfbe7c45e353d693a2a45965d99fa81f2163.)
|
||||
|
||||
* [FIX] WinFsp-FUSE correctly maps SID's from trusted domains to POSIX UID's in a multi-domain environment (using the "trustPosixOffset" attribute). Previously WinFsp-FUSE only handled SID's from the primary domain correctly.
|
||||
|
||||
* [FIX] WinFsp-FUSE options such as `volname`, `VolumePrefix`, `FileSystemName`, `ExactFileSystemName` are now truncated when too long. (See GitHub issue #311.)
|
||||
|
||||
* [FIX] The WinFsp driver is now started in a thread-safe manner if it is not already running. (See GitHub issue billziss-gh/cgofuse#51.)
|
||||
|
||||
* [FIX] Credentials entered in the Credentials dialog (when mapping network drives) are no longer saved by default. (See GitHub PR #342. Thanks @gaotxg.)
|
||||
|
||||
|
||||
v1.9B2 (2021 Beta2)::
|
||||
|
||||
Changes since v1.8:
|
||||
@ -12,8 +36,18 @@ Changes since v1.8:
|
||||
|
||||
* [NEW] A native file system (notifyfs) and a .NET file system (notifyfs-dotnet) have been added to showcase the new file change notification API.
|
||||
|
||||
* [NEW] A new WinFsp-FUSE option `FileSecurity` has been added that allows the complete specification of file security descriptors using SDDL. (See GitHub issue https://github.com/rclone/rclone/issues/4717#issuecomment-767723287.)
|
||||
|
||||
* [FIX] The FSD now correctly handles a rare situation where receiving too many CLOSE calls from the OS (e.g. when caching thousands of files) could result in a bogus "insufficient resources" error. (See commit 0af0bfbe7c45e353d693a2a45965d99fa81f2163.)
|
||||
|
||||
* [FIX] WinFsp-FUSE correctly maps SID's from trusted domains to POSIX UID's in a multi-domain environment (using the "trustPosixOffset" attribute). Previously WinFsp-FUSE only handled SID's from the primary domain correctly.
|
||||
|
||||
* [FIX] WinFsp-FUSE options such as `volname`, `VolumePrefix`, `FileSystemName`, `ExactFileSystemName` are now truncated when too long. (See GitHub issue #311.)
|
||||
|
||||
* [FIX] The WinFsp driver is now started in a thread-safe manner if it is not already running. (See GitHub issue billziss-gh/cgofuse#51.)
|
||||
|
||||
* [FIX] Credentials entered in the Credentials dialog (when mapping network drives) are no longer saved by default. (See GitHub PR #342. Thanks @gaotxg.)
|
||||
|
||||
|
||||
v1.9B1 (2021 Beta1)::
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
<MyCanonicalVersion>1.9</MyCanonicalVersion>
|
||||
|
||||
<MyProductVersion>2021 Beta2</MyProductVersion>
|
||||
<MyProductStage>Beta</MyProductStage>
|
||||
<MyProductVersion>2021</MyProductVersion>
|
||||
<MyProductStage>Gold</MyProductStage>
|
||||
|
||||
<MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion>
|
||||
<MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas>
|
||||
|
@ -123,9 +123,12 @@ static struct
|
||||
PWSTR DnsDomainName;
|
||||
ULONG TrustPosixOffset;
|
||||
} *FspTrustedDomains;
|
||||
ULONG FspTrustedDomainCount;
|
||||
static ULONG FspTrustedDomainCount;
|
||||
static BOOLEAN FspDistinctPermsForSameOwnerGroup;
|
||||
static INIT_ONCE FspPosixInitOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
#if !defined(_KERNEL_MODE)
|
||||
|
||||
static ULONG FspPosixInitializeTrustPosixOffsets(VOID)
|
||||
{
|
||||
PVOID Ldap = 0;
|
||||
@ -169,6 +172,28 @@ exit:
|
||||
return LdapResult;
|
||||
}
|
||||
|
||||
static VOID FspPosixInitializeFromRegistry(VOID)
|
||||
{
|
||||
HKEY RegKey;
|
||||
LONG Result;
|
||||
DWORD Size;
|
||||
DWORD DistinctPermsForSameOwnerGroup;
|
||||
|
||||
DistinctPermsForSameOwnerGroup = 0;
|
||||
|
||||
Result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\WinFsp",
|
||||
0, KEY_READ | KEY_WOW64_32KEY, &RegKey);
|
||||
if (ERROR_SUCCESS == Result)
|
||||
{
|
||||
Size = sizeof DistinctPermsForSameOwnerGroup;
|
||||
Result = RegGetValueW(RegKey, 0, L"DistinctPermsForSameOwnerGroup",
|
||||
RRF_RT_REG_DWORD, 0, &DistinctPermsForSameOwnerGroup, &Size);
|
||||
RegCloseKey(RegKey);
|
||||
}
|
||||
|
||||
FspDistinctPermsForSameOwnerGroup = !!DistinctPermsForSameOwnerGroup;
|
||||
}
|
||||
|
||||
static BOOL WINAPI FspPosixInitialize(
|
||||
PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
|
||||
{
|
||||
@ -300,6 +325,8 @@ static BOOL WINAPI FspPosixInitialize(
|
||||
if (0 < FspTrustedDomainCount)
|
||||
FspPosixInitializeTrustPosixOffsets();
|
||||
|
||||
FspPosixInitializeFromRegistry();
|
||||
|
||||
exit:
|
||||
if (0 != TrustedDomains)
|
||||
NetApiBufferFree(TrustedDomains);
|
||||
@ -330,7 +357,9 @@ VOID FspPosixFinalize(BOOLEAN Dynamic)
|
||||
MemFree(FspPrimaryDomainSid);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ULONG NTAPI FspPosixInitialize(
|
||||
PRTL_RUN_ONCE RunOnce, PVOID Parameter, PVOID *Context)
|
||||
{
|
||||
@ -376,8 +405,12 @@ ULONG NTAPI FspPosixInitialize(
|
||||
FspPrimaryDomainSid = &FspPrimaryDomainSidBuf.V;
|
||||
}
|
||||
|
||||
/* always enable permissive permissions for same owner group in kernel mode */
|
||||
FspDistinctPermsForSameOwnerGroup = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline BOOLEAN FspPosixIsRelativeSid(PISID Sid1, PISID Sid2)
|
||||
@ -778,7 +811,7 @@ FSP_API NTSTATUS FspPosixMapPermissionsToSecurityDescriptor(
|
||||
* bits are different?. In this case, the most restrictive permissions
|
||||
* are chosen and assigned to both ACEs.
|
||||
*/
|
||||
if (EqualSid(OwnerSid, GroupSid))
|
||||
if (!FspDistinctPermsForSameOwnerGroup && EqualSid(OwnerSid, GroupSid))
|
||||
OwnerPerm = GroupPerm = OwnerPerm & GroupPerm;
|
||||
|
||||
/* [PERMS]
|
||||
|
@ -1288,10 +1288,31 @@ static NTSTATUS FspFsvolSetBasicInformation(PFILE_OBJECT FileObject,
|
||||
}
|
||||
|
||||
Request->Req.SetInformation.Info.Basic.FileAttributes = FileAttributes;
|
||||
Request->Req.SetInformation.Info.Basic.CreationTime = Info->CreationTime.QuadPart;
|
||||
Request->Req.SetInformation.Info.Basic.LastAccessTime = Info->LastAccessTime.QuadPart;
|
||||
Request->Req.SetInformation.Info.Basic.LastWriteTime = Info->LastWriteTime.QuadPart;
|
||||
Request->Req.SetInformation.Info.Basic.ChangeTime = Info->ChangeTime.QuadPart;
|
||||
|
||||
/*
|
||||
* From FILE_BASIC_INFORMATION (https://tinyurl.com/hwex4bd9):
|
||||
*
|
||||
* The file system updates the values of the LastAccessTime,
|
||||
* LastWriteTime, and ChangeTime members as appropriate after an I/O
|
||||
* operation is performed on a file. A driver or application can
|
||||
* request that the file system not update one or more of these
|
||||
* members for I/O operations that are performed on the caller's file
|
||||
* handle by setting the appropriate members to -1. The caller can set
|
||||
* one, all, or any other combination of these three members to -1.
|
||||
* Only the members that are set to -1 will be unaffected by I/O
|
||||
* operations on the file handle; the other members will be updated as
|
||||
* appropriate.
|
||||
*
|
||||
* GitHub issue #362
|
||||
*/
|
||||
Request->Req.SetInformation.Info.Basic.CreationTime =
|
||||
-1 != Info->CreationTime.QuadPart ? Info->CreationTime.QuadPart : 0;
|
||||
Request->Req.SetInformation.Info.Basic.LastAccessTime =
|
||||
-1 != Info->LastAccessTime.QuadPart ? Info->LastAccessTime.QuadPart : 0;
|
||||
Request->Req.SetInformation.Info.Basic.LastWriteTime =
|
||||
-1 != Info->LastWriteTime.QuadPart ? Info->LastWriteTime.QuadPart : 0;
|
||||
Request->Req.SetInformation.Info.Basic.ChangeTime =
|
||||
-1 != Info->ChangeTime.QuadPart ? Info->ChangeTime.QuadPart : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
51
tools/fix162.bat
Normal file
51
tools/fix162.bat
Normal file
@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
|
||||
REM This script is used to fix GitHub issue #162:
|
||||
REM https://github.com/billziss-gh/winfsp/issues/162
|
||||
REM
|
||||
REM It works as follows:
|
||||
REM
|
||||
REM - Creates a junction called `amd64` inside the `WinFsp\bin` directory
|
||||
REM that points back to the directory.
|
||||
REM
|
||||
REM - Updates the registry `ProviderPath` of the WinFsp Network Provider to
|
||||
REM point to `...\bin\%PROCESSOR_ARCHITECTURE%\winfsp-x64.dll`.
|
||||
REM
|
||||
REM It requires Administrator privileges in order to run.
|
||||
|
||||
setlocal
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set RegKey="HKLM\SOFTWARE\WinFsp"
|
||||
set RegVal="InstallDir"
|
||||
reg query !RegKey! /v !RegVal! /reg:32 >nul 2>&1
|
||||
if !ERRORLEVEL! equ 0 (
|
||||
for /f "tokens=2,*" %%i in ('reg query !RegKey! /v !RegVal! /reg:32 ^| findstr !RegVal!') do (
|
||||
set InstallDir=%%j
|
||||
)
|
||||
)
|
||||
if not exist "!InstallDir!" (echo cannot find WinFsp installation >&2 & goto fail)
|
||||
|
||||
set RegKey="HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Np\NetworkProvider"
|
||||
set RegVal="ProviderPath"
|
||||
|
||||
if not X%1==X-u (
|
||||
echo fix #162
|
||||
|
||||
if not exist "!InstallDir!bin\amd64" mklink /j "!InstallDir!bin\amd64" "!InstallDir!bin"
|
||||
|
||||
reg add !RegKey! /v !RegVal! /t REG_EXPAND_SZ /d "!InstallDir!bin\%%PROCESSOR_ARCHITECTURE%%\winfsp-x64.dll" /f
|
||||
|
||||
) else (
|
||||
echo undo fix #162
|
||||
|
||||
if exist "!InstallDir!bin\amd64" rmdir "!InstallDir!bin\amd64"
|
||||
|
||||
reg add !RegKey! /v !RegVal! /t REG_SZ /d "!InstallDir!bin\winfsp-x64.dll" /f
|
||||
|
||||
)
|
||||
|
||||
exit /b 0
|
||||
|
||||
:fail
|
||||
exit /b 1
|
Reference in New Issue
Block a user