Compare commits

..

8 Commits
v1.1B3 ... v1.1

8 changed files with 59 additions and 25 deletions

View File

@ -1,5 +1,18 @@
= Changelog = Changelog
v1.1 (2017.1)::
This release brings some major new components and improvements.
- A .NET layer that allows the creation of file systems in managed mode. This is contained in the new `winfsp-msil.dll`. The new .NET layer is being tested with the WinFsp test suites and Microsoft's ifstest.
- FUSE for Cygwin is now included with the installer.
- FUSE now has a `-ovolname=VOLNAME` parameter that allows setting the volume label. Thanks @samkelly.
- A number of other FUSE improvements have been made (see issue #85).
NOTE: The C++ layer included in the v1.1 beta releases is not part of this release as it is still work in progress. It can be found in `inc/winfsp/winfsp.hpp` in the WinFsp source repository.
v1.1B3 (2017.1 B3):: v1.1B3 (2017.1 B3)::
v1.1B2 (2017.1 B2):: v1.1B2 (2017.1 B2)::

View File

@ -252,9 +252,9 @@
<Component Id="C.winfsp.h"> <Component Id="C.winfsp.h">
<File Name="winfsp.h" KeyPath="yes" /> <File Name="winfsp.h" KeyPath="yes" />
</Component> </Component>
<Component Id="C.winfsp.hpp"> <!--Component Id="C.winfsp.hpp">
<File Name="winfsp.hpp" KeyPath="yes" /> <File Name="winfsp.hpp" KeyPath="yes" />
</Component> </Component-->
</Directory> </Directory>
<Directory Id="INCDIR.fuse" Name="fuse"> <Directory Id="INCDIR.fuse" Name="fuse">
<Component Id="C.fuse.h"> <Component Id="C.fuse.h">
@ -350,7 +350,7 @@
<File Name="passthrough.vcxproj.filters" KeyPath="yes" /> <File Name="passthrough.vcxproj.filters" KeyPath="yes" />
</Component> </Component>
</Directory> </Directory>
<Directory Id="SMPDIR.passthrough_cpp" Name="passthrough-cpp"> <!--Directory Id="SMPDIR.passthrough_cpp" Name="passthrough-cpp">
<Component Id="C.passthrough_cpp.cpp"> <Component Id="C.passthrough_cpp.cpp">
<File Name="passthrough-cpp.cpp" KeyPath="yes" /> <File Name="passthrough-cpp.cpp" KeyPath="yes" />
</Component> </Component>
@ -363,7 +363,7 @@
<Component Id="C.passthrough_cpp.vcxproj.filters"> <Component Id="C.passthrough_cpp.vcxproj.filters">
<File Name="passthrough-cpp.vcxproj.filters" KeyPath="yes" /> <File Name="passthrough-cpp.vcxproj.filters" KeyPath="yes" />
</Component> </Component>
</Directory> </Directory-->
<Directory Id="SMPDIR.passthrough_fuse" Name="passthrough-fuse"> <Directory Id="SMPDIR.passthrough_fuse" Name="passthrough-fuse">
<Component Id="C.passthrough_fuse.c"> <Component Id="C.passthrough_fuse.c">
<File Name="passthrough-fuse.c" KeyPath="yes" /> <File Name="passthrough-fuse.c" KeyPath="yes" />
@ -454,7 +454,7 @@
<ComponentGroup Id="C.WinFsp.inc"> <ComponentGroup Id="C.WinFsp.inc">
<ComponentRef Id="C.fsctl.h" /> <ComponentRef Id="C.fsctl.h" />
<ComponentRef Id="C.winfsp.h" /> <ComponentRef Id="C.winfsp.h" />
<ComponentRef Id="C.winfsp.hpp" /> <!--ComponentRef Id="C.winfsp.hpp" /-->
<ComponentRef Id="C.fuse.h" /> <ComponentRef Id="C.fuse.h" />
<ComponentRef Id="C.fuse_common.h" /> <ComponentRef Id="C.fuse_common.h" />
<ComponentRef Id="C.fuse_opt.h" /> <ComponentRef Id="C.fuse_opt.h" />
@ -482,10 +482,10 @@
<ComponentRef Id="C.passthrough.sln" /> <ComponentRef Id="C.passthrough.sln" />
<ComponentRef Id="C.passthrough.vcxproj" /> <ComponentRef Id="C.passthrough.vcxproj" />
<ComponentRef Id="C.passthrough.vcxproj.filters" /> <ComponentRef Id="C.passthrough.vcxproj.filters" />
<ComponentRef Id="C.passthrough_cpp.cpp" /> <!--ComponentRef Id="C.passthrough_cpp.cpp" /-->
<ComponentRef Id="C.passthrough_cpp.sln" /> <!--ComponentRef Id="C.passthrough_cpp.sln" /-->
<ComponentRef Id="C.passthrough_cpp.vcxproj" /> <!--ComponentRef Id="C.passthrough_cpp.vcxproj" /-->
<ComponentRef Id="C.passthrough_cpp.vcxproj.filters" /> <!--ComponentRef Id="C.passthrough_cpp.vcxproj.filters" /-->
<ComponentRef Id="C.passthrough_fuse.c" /> <ComponentRef Id="C.passthrough_fuse.c" />
<ComponentRef Id="C.passthrough_fuse.winposix.c" /> <ComponentRef Id="C.passthrough_fuse.winposix.c" />
<ComponentRef Id="C.passthrough_fuse.winposix.h" /> <ComponentRef Id="C.passthrough_fuse.winposix.h" />

View File

@ -17,8 +17,8 @@
<MyCanonicalVersion>1.1</MyCanonicalVersion> <MyCanonicalVersion>1.1</MyCanonicalVersion>
<MyProductVersion>2017.1 B3</MyProductVersion> <MyProductVersion>2017.1</MyProductVersion>
<MyProductStage>Beta</MyProductStage> <MyProductStage>Gold</MyProductStage>
<MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion> <MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion>
<MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas> <MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas>

View File

@ -10,6 +10,11 @@ I am running Windows 7 and I am finding that the installed driver is not signed.
https://technet.microsoft.com/en-us/library/security/3033929.aspx https://technet.microsoft.com/en-us/library/security/3033929.aspx
Disconnecting (unmapping) a network drive does not work. [@carlreinke]::
You may have Dokany installed. Dokany installs its own Network Provider DLL that unfortunately interferes with the WinFsp handling of network drives. The solution is to change your system's Network Provider order and ensure that the WinFsp Network Provider runs before the Dokany one. Instructions on how to change the Network Provider order can be found in this http://blogs.interfacett.com/changing-the-network-provider-order-in-windows-10[article].
Why is the DLL not installed in the Windows system directories? [@netheril96]:: Why is the DLL not installed in the Windows system directories? [@netheril96]::
It is true that this would make it convenient to load the DLL, because the Windows loader looks into the Windows system directories when it loads DLL's. However, in the opinion of the WinFsp author, software that does not ship with the OS should not be installing components in the system directories. It is true that this would make it convenient to load the DLL, because the Windows loader looks into the Windows system directories when it loads DLL's. However, in the opinion of the WinFsp author, software that does not ship with the OS should not be installing components in the system directories.

View File

@ -38,7 +38,7 @@ For example, the MEMFS sample adds the following registry entries in a 64-bit sy
"Security"="D:P(A;;RPWPLC;;;WD)" "Security"="D:P(A;;RPWPLC;;;WD)"
"JobControl"=dword:00000001 "JobControl"=dword:00000001
When the WinFsp.Launcher starts up it creates a named pipe that applications can use to start, stop, get information about and list service instances. A small command line utility (`launchctl`) can be used to issue those commands. The CallNamedPipeW API can be used as well. When the WinFsp.Launcher starts up it creates a named pipe that applications can use to start, stop, get information about and list service instances. A small command line utility (`launchctl`) can be used to issue those commands. The `CallNamedPipeW` API can be used as well.
One final note regarding security. Notice the `Security` registry value in the example above. This registry value uses SDDL syntax to instruct WinFsp.Launcher to allow Everyone (`WD`) to start (`RP`), stop (`WP`) and get information (`LC`) about the service instance. If the `Security` registry value is missing the default is to allow only LocalSystem and Administrators to control the service instance. One final note regarding security. Notice the `Security` registry value in the example above. This registry value uses SDDL syntax to instruct WinFsp.Launcher to allow Everyone (`WD`) to start (`RP`), stop (`WP`) and get information (`LC`) about the service instance. If the `Security` registry value is missing the default is to allow only LocalSystem and Administrators to control the service instance.
@ -47,3 +47,13 @@ One final note regarding security. Notice the `Security` registry value in the e
WinFsp includes a Network Provider that integrates with Windows and can be used to start and stop user mode file systems from the Windows shell. To achieve this the Network Provider (implemented as part of the WinFsp DLL) works closely with the WinFsp.Launcher service. WinFsp includes a Network Provider that integrates with Windows and can be used to start and stop user mode file systems from the Windows shell. To achieve this the Network Provider (implemented as part of the WinFsp DLL) works closely with the WinFsp.Launcher service.
For example, if a user uses the Windows Explorer to map `\\memfs64\share` to the `Z:` drive, the Network Provider will instruct the WinFsp.Launcher to start an instance of the memfs64 service with command line `-i -F NTFS -n 65536 -s 67108864 -u \\memfs64\share -m Z:`. When the user disconnects the `Z:` drive, the Network Provider will instruct the WinFsp.Launcher to stop the previously started instance of the memfs64 service. For example, if a user uses the Windows Explorer to map `\\memfs64\share` to the `Z:` drive, the Network Provider will instruct the WinFsp.Launcher to start an instance of the memfs64 service with command line `-i -F NTFS -n 65536 -s 67108864 -u \\memfs64\share -m Z:`. When the user disconnects the `Z:` drive, the Network Provider will instruct the WinFsp.Launcher to stop the previously started instance of the memfs64 service.
== File System Credential Support
Some file systems require credentials in order to allow access and be mounted. Such file systems must add a registry value `Credentials`:
"Credentials"=dword:00000001
This will instruct the WinFsp Network Provider to request a password from the user prior to starting the file system. This password will then be securely passed to the WinFsp Launcher which in turn will pass it to the user mode file system on its standard input. The user mode file system must respond `OK` if the password is correct and allows access to the user mode file system. Any other response from the user mode file system (including a timeout without a response) is interpreted as an authentication failure.
NOTE: During password entry the user may also choose to "remember" the password in which case it will be saved in the Windows Credential Manager.

View File

@ -468,17 +468,18 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
" -o gid=N set file group (-1 for mounting user group)\n" " -o gid=N set file group (-1 for mounting user group)\n"
" -o rellinks interpret absolute symlinks as volume relative\n" " -o rellinks interpret absolute symlinks as volume relative\n"
" -o volname=NAME set volume label\n" " -o volname=NAME set volume label\n"
" -o VolumePrefix=UNC set UNC prefix (\\Server\\Share)\n" " -o VolumePrefix=UNC set UNC prefix (/Server/Share)\n"
" --VolumePrefix=UNC set UNC prefix (\\Server\\Share)\n"
" -o FileSystemName=NAME set file system name\n" " -o FileSystemName=NAME set file system name\n"
" -o DebugLog=FILE debug log file (requires -d)\n" " -o DebugLog=FILE debug log file (requires -d)\n"
"\n" "\n"
FSP_FUSE_LIBRARY_NAME " advanced options:\n" FSP_FUSE_LIBRARY_NAME " advanced options:\n"
" -o FileInfoTimeout=N metadata timeout (millis, -1 for data caching)\n" " -o FileInfoTimeout=N metadata timeout (millis, -1 for data caching)\n"
" -o SectorSize=N sector size for Windows (512-4096, deflt: 4096)\n" " -o SectorSize=N (512-4096, deflt: 4096)\n"
" -o SectorsPerAllocationUnit=N sectors per allocation unit (deflt: 1)\n" " -o SectorsPerAllocationUnit=N (deflt: 1)\n"
" -o MaxComponentLength=N max file name component length (deflt: 255)\n" " -o MaxComponentLength=N (deflt: 255)\n"
" -o VolumeCreationTime=T volume creation time (FILETIME hex format)\n" " -o VolumeCreationTime=T (FILETIME hex format)\n"
" -o VolumeSerialNumber=N volume serial number (32-bit wide)\n" " -o VolumeSerialNumber=N (32-bit wide)\n"
); );
opt_data->help = 1; opt_data->help = 1;
return 1; return 1;
@ -513,6 +514,9 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
return -1; return -1;
opt_data->VolumeParams.Prefix opt_data->VolumeParams.Prefix
[sizeof opt_data->VolumeParams.Prefix / sizeof(WCHAR) - 1] = L'\0'; [sizeof opt_data->VolumeParams.Prefix / sizeof(WCHAR) - 1] = L'\0';
for (PWSTR P = opt_data->VolumeParams.Prefix; *P; P++)
if (L'/' == *P)
*P = '\\';
return 0; return 0;
case 'F': case 'F':
if ('f' == arg[0]) if ('f' == arg[0])

View File

@ -73,8 +73,6 @@ set opt_tests=^
ifstest-memfs-dotnet-disk ^ ifstest-memfs-dotnet-disk ^
sample-passthrough-x64 ^ sample-passthrough-x64 ^
sample-passthrough-x86 ^ sample-passthrough-x86 ^
sample-passthrough-cpp-x64 ^
sample-passthrough-cpp-x86 ^
sample-passthrough-fuse-x64 ^ sample-passthrough-fuse-x64 ^
sample-passthrough-fuse-x86 ^ sample-passthrough-fuse-x86 ^
sample-passthrough-dotnet sample-passthrough-dotnet

View File

@ -192,7 +192,7 @@ typedef struct _MEMFS_FILE_NODE
SIZE_T ReparseDataSize; SIZE_T ReparseDataSize;
PVOID ReparseData; PVOID ReparseData;
#endif #endif
ULONG RefCount; volatile LONG RefCount;
#if defined(MEMFS_NAMED_STREAMS) #if defined(MEMFS_NAMED_STREAMS)
struct _MEMFS_FILE_NODE *MainFileNode; struct _MEMFS_FILE_NODE *MainFileNode;
#endif #endif
@ -260,13 +260,13 @@ VOID MemfsFileNodeDelete(MEMFS_FILE_NODE *FileNode)
static inline static inline
VOID MemfsFileNodeReference(MEMFS_FILE_NODE *FileNode) VOID MemfsFileNodeReference(MEMFS_FILE_NODE *FileNode)
{ {
FileNode->RefCount++; InterlockedIncrement(&FileNode->RefCount);
} }
static inline static inline
VOID MemfsFileNodeDereference(MEMFS_FILE_NODE *FileNode) VOID MemfsFileNodeDereference(MEMFS_FILE_NODE *FileNode)
{ {
if (0 == --FileNode->RefCount) if (0 == InterlockedDecrement(&FileNode->RefCount))
MemfsFileNodeDelete(FileNode); MemfsFileNodeDelete(FileNode);
} }
@ -850,14 +850,18 @@ static NTSTATUS Overwrite(FSP_FILE_SYSTEM *FileSystem,
NTSTATUS Result; NTSTATUS Result;
#if defined(MEMFS_NAMED_STREAMS) #if defined(MEMFS_NAMED_STREAMS)
MEMFS_FILE_NODE_MAP_ENUM_CONTEXT Context = { FALSE }; MEMFS_FILE_NODE_MAP_ENUM_CONTEXT Context = { TRUE };
ULONG Index; ULONG Index;
MemfsFileNodeMapEnumerateNamedStreams(Memfs->FileNodeMap, FileNode, MemfsFileNodeMapEnumerateNamedStreams(Memfs->FileNodeMap, FileNode,
MemfsFileNodeMapEnumerateFn, &Context); MemfsFileNodeMapEnumerateFn, &Context);
for (Index = 0; Context.Count > Index; Index++) for (Index = 0; Context.Count > Index; Index++)
if (1 >= Context.FileNodes[Index]->RefCount) {
LONG RefCount = Context.FileNodes[Index]->RefCount;
MemoryBarrier();
if (2 >= RefCount)
MemfsFileNodeMapRemove(Memfs->FileNodeMap, Context.FileNodes[Index]); MemfsFileNodeMapRemove(Memfs->FileNodeMap, Context.FileNodes[Index]);
}
MemfsFileNodeMapEnumerateFree(&Context); MemfsFileNodeMapEnumerateFree(&Context);
#endif #endif