diff --git a/Changelog.md b/Changelog.md index 4395a455..f1cf1795 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,15 @@ # Changelog +## v1.12B2 (2022.2 Beta2) + +- [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`. + +- [NEW] A new registry setting `MountUseMountmgrFromFSD` has been added. See [WinFsp Registry Settings](https://github.com/winfsp/winfsp/wiki/WinFsp-Registry-Settings) for details. + +- [BUILD] Product configuration for the relative paths to the File System Driver, Network Provider and EventLog is now possible via the file `build.version.props` located in `build\VStudio`. + + ## v1.12B1 (2022.2 Beta1) - [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`. diff --git a/Contributors.asciidoc b/Contributors.asciidoc index 4a27591c..3ace0b19 100644 --- a/Contributors.asciidoc +++ b/Contributors.asciidoc @@ -68,6 +68,7 @@ CONTRIBUTOR LIST |John Tyner |jtyner at gmail.com |Paweł Wegner (Google LLC, https://google.com) |lemourin at google.com |Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com +|Ronny Chan |ronny at ronnychan.ca |Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com |Santiago Ganis |sganis at gmail.com |Tobias Urlaub |saibotu at outlook.de diff --git a/doc/Known-File-Systems.asciidoc b/doc/Known-File-Systems.asciidoc index b3160a16..908901e9 100644 --- a/doc/Known-File-Systems.asciidoc +++ b/doc/Known-File-Systems.asciidoc @@ -34,3 +34,4 @@ This document contains a list of known open-source file systems and file system - https://github.com/billziss-gh/fusepy[Python: fusepy] - Simple ctypes bindings for FUSE - https://github.com/pleiszenburg/refuse[Python: refuse] - Simple cross-plattform ctypes bindings for libfuse / FUSE for macOS / WinFsp - https://github.com/Scille/winfspy[Python: winfspy] - WinFSP binding for Python +- https://github.com/SnowflakePowered/winfsp-rs[Rust: winfsp-rs] - WinFSP binding for Rust diff --git a/doc/WinFsp-Tutorial.asciidoc b/doc/WinFsp-Tutorial.asciidoc index bf2c20a6..b792f6b6 100644 --- a/doc/WinFsp-Tutorial.asciidoc +++ b/doc/WinFsp-Tutorial.asciidoc @@ -538,7 +538,8 @@ static NTSTATUS GetFileInfoInternal(HANDLE Handle, FSP_FSCTL_FILE_INFO *FileInfo FileInfo->LastAccessTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastAccessTime)->QuadPart; FileInfo->LastWriteTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastWriteTime)->QuadPart; FileInfo->ChangeTime = FileInfo->LastWriteTime; - FileInfo->IndexNumber = 0; + FileInfo->IndexNumber = + ((UINT64)ByHandleFileInfo.nFileIndexHigh << 32) | (UINT64)ByHandleFileInfo.nFileIndexLow; FileInfo->HardLinks = 0; return STATUS_SUCCESS; diff --git a/src/dll/fuse/fuse.c b/src/dll/fuse/fuse.c index 79a5cedb..d729f75d 100644 --- a/src/dll/fuse/fuse.c +++ b/src/dll/fuse/fuse.c @@ -180,7 +180,7 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env, const char *mountpoint, struct fuse_args *args) { struct fuse_chan *ch = 0; - WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH]; + WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH + 4]; int Size; if (0 == mountpoint || '\0' == mountpoint[0] || @@ -212,6 +212,33 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env, MountPointBuf[6] = '\0'; Size = 7 * sizeof(WCHAR); } + else if ( + ( + '\\' == mountpoint[0] && + '\\' == mountpoint[1] && + ('?' == mountpoint[2] || '.' == mountpoint[2]) && + '\\' == mountpoint[3] + ) && + ( + ('A' <= mountpoint[4] && mountpoint[4] <= 'Z') || + ('a' <= mountpoint[4] && mountpoint[4] <= 'z') + ) && + ':' == mountpoint[5] && '\\' == mountpoint[6]) + { + MountPointBuf[0] = '\\'; + MountPointBuf[1] = '\\'; + MountPointBuf[2] = mountpoint[2]; + MountPointBuf[3] = '\\'; + + Size = 0; + if (0 != MultiByteToWideChar(CP_UTF8, 0, mountpoint + 4, -1, TempMountPointBuf, MAX_PATH)) + Size = GetFullPathNameW(TempMountPointBuf, MAX_PATH, MountPointBuf + 4, 0); + + if (0 == Size || MAX_PATH <= Size) + goto fail; + + Size = (Size + 4 + 1) * sizeof(WCHAR); + } else if ( ( ('A' <= mountpoint[0] && mountpoint[0] <= 'Z') || diff --git a/tst/passthrough/passthrough.c b/tst/passthrough/passthrough.c index 0ba05ee9..c0c4122b 100644 --- a/tst/passthrough/passthrough.c +++ b/tst/passthrough/passthrough.c @@ -62,7 +62,8 @@ static NTSTATUS GetFileInfoInternal(HANDLE Handle, FSP_FSCTL_FILE_INFO *FileInfo FileInfo->LastAccessTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastAccessTime)->QuadPart; FileInfo->LastWriteTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastWriteTime)->QuadPart; FileInfo->ChangeTime = FileInfo->LastWriteTime; - FileInfo->IndexNumber = 0; + FileInfo->IndexNumber = + ((UINT64)ByHandleFileInfo.nFileIndexHigh << 32) | (UINT64)ByHandleFileInfo.nFileIndexLow; FileInfo->HardLinks = 0; return STATUS_SUCCESS;