mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
dll: mount: MountDoNotUseLauncher registry setting
This commit is contained in:
parent
2d41693f3c
commit
490d021b22
@ -12,6 +12,8 @@ Changes since v1.9:
|
|||||||
** Going forward this behavior will change. The user and group mode permissions will not be considered together even in the case where the user SID and group SID are the same. This will resolve the access denied errors.
|
** Going forward this behavior will change. The user and group mode permissions will not be considered together even in the case where the user SID and group SID are the same. This will resolve the access denied errors.
|
||||||
** However to preserve backward compatibility (there might be some file systems that rely on the old behavior) we will do so in stages. For release v1.10 (2021.1) there is a new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `DistinctPermsForSameOwnerGroup`, which if set to 1 will direct WinFsp-FUSE to use the new behavior. The default value is 0 which directs WinFsp-FUSE to use the old behavior. This default will change in a future release.
|
** However to preserve backward compatibility (there might be some file systems that rely on the old behavior) we will do so in stages. For release v1.10 (2021.1) there is a new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `DistinctPermsForSameOwnerGroup`, which if set to 1 will direct WinFsp-FUSE to use the new behavior. The default value is 0 which directs WinFsp-FUSE to use the old behavior. This default will change in a future release.
|
||||||
|
|
||||||
|
* [NEW] A new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `MountDoNotUseLauncher` has been introduced, which if set to 1 will disable the use of the Launcher during mounting. The default value is 0 which allows the use of the Launcher during mounting in those rare cases when necessary. (In general the Launcher is not necessary for mounting. However when running a file system in the Windows Service context (session 0) under an account that is not LocalSystem (e.g. `NT AUTHORITY\NETWORK SERVICE`), the Launcher is used to create global drives.)
|
||||||
|
|
||||||
* [FIX] File share access when overwriting a file (e.g. when using `TRUNCATE_EXISTING`) is now done in a manner compatible with NTFS (previously there were cases when overwriting a file where behavior diverged from the NTFS one). (See GitHub issue #364.)
|
* [FIX] File share access when overwriting a file (e.g. when using `TRUNCATE_EXISTING`) is now done in a manner compatible with NTFS (previously there were cases when overwriting a file where behavior diverged from the NTFS one). (See GitHub issue #364.)
|
||||||
|
|
||||||
* [FIX] Fixed a problem in the file system shutdown protocol which resolves an occasional access violation in the user mode file system process. Previously it was possible for a file system to crash when stopping itself using `FspFileSystemStopDispatcher`; this problem has been rectified. (See GitHub issue #369.)
|
* [FIX] Fixed a problem in the file system shutdown protocol which resolves an occasional access violation in the user mode file system process. Previously it was possible for a file system to crash when stopping itself using `FspFileSystemStopDispatcher`; this problem has been rectified. (See GitHub issue #369.)
|
||||||
|
@ -28,6 +28,29 @@ static NTSTATUS (NTAPI *FspNtMakeTemporaryObject)(
|
|||||||
HANDLE Handle);
|
HANDLE Handle);
|
||||||
static NTSTATUS (NTAPI *FspNtClose)(
|
static NTSTATUS (NTAPI *FspNtClose)(
|
||||||
HANDLE Handle);
|
HANDLE Handle);
|
||||||
|
static BOOLEAN FspMountDoNotUseLauncher;
|
||||||
|
|
||||||
|
static VOID FspMountInitializeFromRegistry(VOID)
|
||||||
|
{
|
||||||
|
HKEY RegKey;
|
||||||
|
LONG Result;
|
||||||
|
DWORD Size;
|
||||||
|
DWORD MountDoNotUseLauncher;
|
||||||
|
|
||||||
|
MountDoNotUseLauncher = 0;
|
||||||
|
|
||||||
|
Result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\" FSP_FSCTL_PRODUCT_NAME,
|
||||||
|
0, KEY_READ | KEY_WOW64_32KEY, &RegKey);
|
||||||
|
if (ERROR_SUCCESS == Result)
|
||||||
|
{
|
||||||
|
Size = sizeof MountDoNotUseLauncher;
|
||||||
|
Result = RegGetValueW(RegKey, 0, L"MountDoNotUseLauncher",
|
||||||
|
RRF_RT_REG_DWORD, 0, &MountDoNotUseLauncher, &Size);
|
||||||
|
RegCloseKey(RegKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
FspMountDoNotUseLauncher = !!MountDoNotUseLauncher;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL WINAPI FspMountInitialize(
|
static BOOL WINAPI FspMountInitialize(
|
||||||
PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
|
PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
|
||||||
@ -49,6 +72,8 @@ static BOOL WINAPI FspMountInitialize(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FspMountInitializeFromRegistry();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +391,7 @@ static NTSTATUS FspMountSet_Drive(PWSTR VolumeName, PWSTR MountPoint, PHANDLE PM
|
|||||||
|
|
||||||
Result = FspServiceContextCheck(0, &IsLocalSystem);
|
Result = FspServiceContextCheck(0, &IsLocalSystem);
|
||||||
IsServiceContext = NT_SUCCESS(Result) && !IsLocalSystem;
|
IsServiceContext = NT_SUCCESS(Result) && !IsLocalSystem;
|
||||||
if (IsServiceContext)
|
if (IsServiceContext && !FspMountDoNotUseLauncher)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If the current process is in the service context but not LocalSystem,
|
* If the current process is in the service context but not LocalSystem,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user