From ca3170c293a192a5d30be3b87ac6da31dc998a7b Mon Sep 17 00:00:00 2001 From: Ronny Chan Date: Sun, 25 Sep 2022 22:09:40 -0400 Subject: [PATCH 1/6] doc: Add winfsp-rs to file system libraries --- doc/Known-File-Systems.asciidoc | 1 + 1 file changed, 1 insertion(+) 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 From 7735506cc7b3616e21c1a2ffb172df0723c57f93 Mon Sep 17 00:00:00 2001 From: Ronny Chan Date: Sun, 25 Sep 2022 22:14:11 -0400 Subject: [PATCH 2/6] legal: add Ronny Chan to contributors --- Contributors.asciidoc | 1 + 1 file changed, 1 insertion(+) 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 From ea189c5b683b25eeca0cdb60fd12e27536db1c01 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 26 Sep 2022 15:26:34 +0100 Subject: [PATCH 3/6] dll: fuse: fix mountmgr directory mount points under Cygwin --- src/dll/fuse/fuse.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) 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') || From 2c3800077f9efad42ead3c2e8aa78024f5481f8e Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 26 Sep 2022 17:26:25 +0100 Subject: [PATCH 4/6] tst: passthrough: GetFileInfoInternal: fix IndexNumber --- doc/WinFsp-Tutorial.asciidoc | 3 ++- tst/passthrough/passthrough.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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/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; From 9ede097e7309543f644d62459ee361937cb1ebd2 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 26 Sep 2022 17:34:36 +0100 Subject: [PATCH 5/6] changelog: update for v1.12B2 --- Changelog.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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`. From a2d49a1dede21fe0cef301b9c63955936e746f6e Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 26 Sep 2022 17:35:57 +0100 Subject: [PATCH 6/6] build: version: 2022.2 Beta2 --- build/VStudio/build.version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/VStudio/build.version.props b/build/VStudio/build.version.props index ac2341a1..96e0615c 100644 --- a/build/VStudio/build.version.props +++ b/build/VStudio/build.version.props @@ -20,7 +20,7 @@ 1.12 - 2022.2 Beta1 + 2022.2 Beta2 Beta DigiCertGlobalG3CodeSigningECCSHA3842021CA1.cer