Compare commits

..

14 Commits

Author SHA1 Message Date
0002655782 build: update version: 2020 2020-01-27 14:26:45 -08:00
e0e8d74d01 update changelog 2020-01-27 14:25:12 -08:00
e608920679 Merge pull request #272 from pfrejo/hotfix-1.5
Fixed data corruption when overwriting a file on a Fuse v3 filesystem
2020-01-27 14:14:35 -08:00
dbfbcb547d Fixed data corruption when overwriting a file on a Fuse v3 filesystem
When a file of size "s" is overwritten, forcing "O_APPEND" flag
makes the server file offset to be placed "s" bytes in advance.
This caused subsequent write operations to be paded by "s" zeroes,
thus corrupting the file.
2020-01-23 21:31:56 +01:00
b3dfea8303 tools: fix-source-copyright: fix botched script 2020-01-22 14:35:24 -08:00
3ab0e5a3d3 doc: add kernel mode file systems document 2020-01-16 17:04:23 -08:00
d687ef3a67 update Changelog (PR #270) 2020-01-15 13:39:59 -08:00
6df5ff980f Merge branch 'hammerg-track_dir_check' 2020-01-15 13:27:19 -08:00
14ac0f8db9 dll: FspFileSystemOpCreate_FileOpenTargetDirectory 2020-01-15 13:26:29 -08:00
ac306c2ce1 dll: open as directory when file's parent directory should be opened. 2020-01-05 09:09:05 +02:00
aedf01a384 update source copyright for 2020 2020-01-02 17:50:40 -08:00
0ce8b1c254 build: bump version to 2020.1 B1 2020-01-02 17:46:13 -08:00
4e0690e65f update Changelog for v1.5 2019-12-31 16:56:59 -08:00
e7b81e4bac build: bump version to 2019.3 GOLD 2019-12-31 16:55:35 -08:00
163 changed files with 330 additions and 167 deletions

View File

@ -1,5 +1,48 @@
= Changelog
v1.6 (2020)::
Changes since v1.5:
* [FIX] Do no pass `O_APPEND` flag to FUSE file systems, which would result in data corruption under some circumstances. (See PR #272. Thanks @pfrejo.)
* [FIX] Fix how rename target directories are opened (use `FILE_DIRECTORY_FILE`). (See PR #270. Thanks @hammerg.)
v1.5 (2019.3)::
Changes since v1.4:
* [GEN] WinFsp file systems can now be used by WSLinux. File systems must enable this support by setting the `FSP_FSCTL_VOLUME_PARAMS::WslFeatures` bit. Use the command `sudo mount -t drvfs x: /mnt/x` to mount.
* [GEN] Extended attribute support has been added for all WinFsp API's: native, .NET, FUSE2 and FUSE3.
* [GEN] Mount Manager support has been added and it works for current and new file systems:
** If the file system mountpoint is in the syntax `\\.\X:` then the Mount Manager is used.
** If the file system mountpoint is in the syntax `X:` then `DefineDosDeviceW` is used (i.e. same as today).
** If the file system mountpoint is in the syntax `X:\DIR` then a reparse point is used and the file system is mounted as a directory (i.e. same as today).
** Caveats:
*** It requires Administrator access. This is because opening the `\\.\MountPointManager` device requires Administrator access.
*** It currently works with drives (`\\.\X:`) but not directories (`\\.\X:\DIR`).
*** Mount Manager drives created by WinFsp are transient. WinFsp takes various steps to ensure that this is the case.
*** Mount Manager drives are global and are visible across Terminal Services sessions (they go into the `\GLOBAL??` portion of the NT namespace).
* [FSD] Support for kernel-mode file systems on top of WinFsp has been added. See `FspFsextProvider`. This is in preparation for WinFuse - FUSE for Windows and WSLinux.
* [FSD] FastIO support has been added. FastIO operations are enabled on cache-enabled file systems with the notable exception of `FastIoQueryOpen`, which allows opening files in kernel mode; this operation requires the file system to specify the `FSP_FSCTL_VOLUME_PARAMS::AllowOpenInKernelMode` flag.
* [FSD] Support for `FileFsSectorSizeInformation` and `IOCTL_STORAGE_QUERY_PROPERTY / StorageAccessAlignmentProperty` has been added.
* [DLL] The `FspFileSystemStartDispatcher` default number of threads (`ThreadCount==0`) has been changed. See commit 3902874ac93fe40685d9761f46a96358ba24f24c for more.
* [FUSE] FUSE has new `-o UserName=DOMAIN+USERNAME` and `-o GroupName=DOMAIN+GROUPNAME` options. These function like the `-o uid=UID` and `-o gid=GID` options, but accept Windows user and groups names.
* [FUSE] FUSE has new `-o dothidden` option that is used to add the Windows hidden file attribute to files that start with a dot.
* [FUSE] FUSE has new `-o create_file_umask=nnn` and `-o create_dir_umask=nnn` options that allow for more control than the `-o create_umask=nnn` option.
* [FUSE] FUSE has new `--ExactFileSystemName=FSNAME` option that removes the "FUSE-" prefix from the file system name. (Use with caution: see discussion in PR #251.) (Thanks @johntyner.)
* [.NET] The .NET API now supports asynchronous handling of `Read`, `Write` and `ReadDirectory`. (Thanks @dworkin.)
* [.NET] The .NET API now supports fine-grained timeouts (`VolumeInfoTimeout`, `DirInfoTimeout`, etc).
* [.NET] The .NET API has new method `FileSystemHost.MountEx` that adds a `ThreadCount` parameter.
* [LAUNCH] The Launcher can now rewrite path arguments passed to file systems during launching using "Path Transformation Language". See commit a73f1b95592617ac7484e16c2e642573a4d65644 for more.
* [MEMFS] A new memfs FUSE3 file system written in C++ has been added. See `tst/memfs-fuse3`.
* [AIRFS] John Oberschelp has done some fantastic work adding persistence to the airfs file system. (Thanks @JohnOberschelp.)
* [FIX] Fixes for very large (> 4GiB) files. (Thanks @dworkin.)
* [FIX] A fix for how FUSE handles the return value from `opendir`. (GitHub issue billziss-gh/sshfs-win#54)
* [FIX] A fix for an invalid UID to SID mapping on domains with a lot of users. (Thanks @sganis.)
* [FIX] A fix on the C++ layer. (Thanks @colatkinson.)
* Other fixes and improvements.
v1.5B4 (2019.3 B4)::

View File

@ -61,8 +61,10 @@ CONTRIBUTOR LIST
|Felix Croes |felix at dworkin.nl
|Francois Karam (KS2, http://www.ks2.fr) |francois.karam at ks2.fr
|Fritz Elfert |fritz-github at fritz-elfert.de
|Gal Hammer (Red Hat, https://www.redhat.com) |ghammer at redhat.com
|John Oberschelp |john at oberschelp.net
|John Tyner |jtyner at gmail.com
|Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com
|Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com
|Santiago Ganis |sganis at gmail.com
|Tobias Urlaub |saibotu at outlook.de

View File

@ -1,7 +1,7 @@
/**
* @file CustomActions.cpp
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -16,10 +16,10 @@
<MyCompanyName>Navimatics LLC</MyCompanyName>
<MyCopyright>2015-$([System.DateTime]::Now.ToString(`yyyy`)) Bill Zissimopoulos</MyCopyright>
<MyCanonicalVersion>1.5</MyCanonicalVersion>
<MyCanonicalVersion>1.6</MyCanonicalVersion>
<MyProductVersion>2019.3 B5</MyProductVersion>
<MyProductStage>Beta</MyProductStage>
<MyProductVersion>2020</MyProductVersion>
<MyProductStage>Gold</MyProductStage>
<MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion>
<MyVersionWithCommas>$(MyVersion.Replace('.',',')),0</MyVersionWithCommas>

View File

@ -12,6 +12,7 @@ The documentation available here discusses various aspects of WinFsp.
- The [[API Reference|WinFsp-API-winfsp.h]] describes the native WinFsp API. This external [[link|http://www.secfs.net/winfsp/apiref/]] may be easier to browse for some people.
- There is also a FUSE compatibility layer for native Windows and Cygwin. See fuse.h in the source repository.
- This [[document|Native-API-vs-FUSE]] discusses the need for both a native API and FUSE and gives some pointers on which one to choose.
- Since release 2019.3 WinFsp supports development of file systems in kernel mode. This [[document|WinFsp-Kernel-Mode-File-Systems]] discusses how to write such file systems.
## Design

View File

@ -0,0 +1,117 @@
= Developing File Systems in Kernel Mode
Since release 2019.3 WinFsp supports development of file systems in kernel mode. Such file systems are implemented as kernel drivers that use WinFsp as the primary FSD (File System Driver) as well as the software library that they interface with to retrieve and service file system requests. This document discusses how to write such file systems.
== Motivation
The primary goal of WinFsp is to enable the easy creation of *user mode* file systems using an easy to use API. There are however legitimate reasons for wanting to develop a file system as a *kernel mode* driver, but the difficulty of doing so often deters people because Windows kernel file system development is notoriously difficult and has many pitfalls.
Some of the reasons that a kernel mode file system may be preferrable to a user mode one:
* A kernel driver may be able to achieve better performance than user mode processes.
* A kernel driver may be able to access advanced OS features that are not easily available to user mode processes.
* A kernel driver may be able to present an alternative interface than the one presented by WinFsp to user mode processes.
Since release 2019.3 WinFsp supports development of file systems as kernel mode drivers. The primary motivation for this work was to support the https://github.com/billziss-gh/winfuse[WinFuse] project, which exposes the FUSE protocol from the Windows kernel in a way that allows FUSE file systems to interface with it, either directly or via https://github.com/libfuse/libfuse[libfuse]. The support was added in such a way that it is generic enough to be used by other kernel mode file systems.
== Overview
A WinFsp "volume" (file system) is typically created using the `FspFsctlCreateVolume` API. This is simply a wrapper around a `CreateFileW` call on one of the WinFsp control devices, either `WinFsp.Disk` or `WinFsp.Net`. The `CreateFileW` call returns a `HANDLE` to the newly created volume, which acts either as a "disk" or a "network" file system, depending on which control device was used to create it.
User mode file systems interact with the WinFsp FSD via `DeviceIoControl/FSP_FSCTL_TRANSACT` messages on the volume `HANDLE`. (This is usually done indirectly via the WinFsp DLL, which hides this detail behind an easy to use API.)
Since release 2019.3 (v1.5) WinFsp supports the following:
* Registration and on-demand loading of a third party driver when a volume that is destined to be handled by the third party driver is created.
* Forwarding of custom `DeviceIoControl` messages to a third party driver. This allows the third party driver to handle custom `FSCTL` requests directed to a WinFsp volume `HANDLE`.
* Kernel-mode API's (called DDI's) that allow a third party driver to register itself with the FSD and interact with its I/O queues.
Such drivers are called within the WinFsp sources and header/library files by the name of "Fsext Providers" (File System Extension Providers). In the text below we will usually refer to them as simply "Providers".
A Provider is a kernel mode driver that uses the FSD as a frontend file system driver to interface with Windows and implement all the complex details that this entails. The Provider fetches I/O requests from the WinFsp I/O queues and may filter them, transform them into a different protocol (as is the case with WinFuse) or use them to fully implement a file system in kernel mode.
== Provider Development
The WinFsp installer includes a "Kernel Developer" feature. When installed this feature adds header and library files in the `opt\fsext` installation subdirectory.
The primary header file used for Provider development is `<winfsp/fsext.h>` and can be found in `opt\fsext\inc`. Additionally the file `<winfsp/fsctl.h>` found in the `inc` installation subdirectory must be in the compiler's include path.
Providers must also be linked with one of the import libraries that can be found in `opt\fsext\lib`. Use the `winfsp-x64.lib` import library when linking the 64-bit version of a Provider and the `winfsp-x86.lib` import library when linking the 32-bit version of a Provider.
=== Provider DDI's
The `<winfsp/fsext.h>` header file includes definitions for the following important DDI's:
* `FspFsextProviderRegister`: This DDI is used by a Provider to register itself with the FSD. Typically the Provider prepares an `FSP_FSEXT_PROVIDER` structure and calls `FspFsextProviderRegister` in its `DriverEntry` routine. The structure's fields are as follows:
** `Version`: Set to `sizeof(FSP_FSEXT_PROVIDER)`.
** `DeviceTransactCode`: The `DeviceIoControl` code that should be forwarded to the Provider.
*** The code must be defined as follows: `CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0xC00 + ProviderSpecific, METHOD_BUFFERED, FILE_ANY_ACCESS)`.
*** Please note that this scheme allows for up to 1024 codes. If you want to define a new Provider code I will appreciate it if you email me at `<billziss at navimatics.com>` so that we can keep track of Provider codes, avoid conflicts and see when we need to extend this scheme.
** `DeviceExtensionSize`: The size of private data that the Provider wants for itself in the `DeviceExtension` of the FSD volume's device object.
** `DeviceInit`: Called when a new volume is created. The `DeviceObject` parameter is the volume's device object. The `VolumeParams` are the initial parameters passed to `FspFsctlCreateVolume` and can be modified by the Provider.
** `DeviceFini`: Called when a volume is going away. This usually happens when the volume `HANDLE` is closed.
** `DeviceExpirationRoutine`: Called once a second as part of the FSD's expiration timer. The FSD uses this timer to expire caches, long-pending IRP's, etc. A Provider can use this call for a similar purpose. The `ExpirationTime` parameter contains the current interrupt time as determined by the FSD.
** `DeviceTransact`: Called whenever the FSD receives a `DeviceIoControl` request with the `DeviceTransactCode`. The `Irp` parameter contains the relevant `IRP_MJ_FILE_SYSTEM_CONTROL`.
** `DeviceExtensionOffset`: Set to `0` on input. On successful return from `FspFsextProviderRegister` it will contain the offset to use for accessing the Provider's private data in the `DeviceExtension` of the FSD volume's device object. Given a `DeviceObject`, the data can be accessed as `(PVOID)((PUINT8)DeviceObject->DeviceExtension + Provider.DeviceExtensionOffset)`.
* `FspFsextProviderTransact`: This DDI is used by a Provider to interact with the FSD I/O queues. The `DeviceObject` is the FSD volume's device object. The `FileObject` is the `FILE_OBJECT` that corresponds to the volume `HANDLE` (created by `FspFsctlCreateVolume`). The `Response` is the response to send and can be `NULL`. The `Request` is a pointer that receives a pointer to a new request from the WinFsp I/O queue and can be `NULL`; if the received pointer is not `NULL` it must be freed with `ExFreePool`.
=== Provider I/O
When the FSD receives a file system IRP it is often able to handle and complete it without help from an external user mode or kernel mode file system. However in most cases the IRP has to be seen and acted upon by an external file system. For this reason the FSD preprocesses the IRP and places it in an I/O queue in the form of a "request". At a later time the external file system retrieves the request, processes it and sends back a "response". The FSD uses the response to locate the original IRP, perform any necessary postprocessing and finally complete the IRP.
Providers typically use the `FspFsextProviderTransact` DDI to receive requests and send back responses. Requests are of type `FSP_FSCTL_TRANSACT_REQ` and responses are of type `FSP_FSCTL_TRANSACT_RSP`. Requests have a `Kind` field which describes what kind of file system operation is being requested. The following request kinds are currently defined in `<winfsp/fsctl.h>`:
```
FspFsctlTransactCreateKind,
FspFsctlTransactOverwriteKind,
FspFsctlTransactCleanupKind,
FspFsctlTransactCloseKind,
FspFsctlTransactReadKind,
FspFsctlTransactWriteKind,
FspFsctlTransactQueryInformationKind,
FspFsctlTransactSetInformationKind,
FspFsctlTransactQueryEaKind,
FspFsctlTransactSetEaKind,
FspFsctlTransactFlushBuffersKind,
FspFsctlTransactQueryVolumeInformationKind,
FspFsctlTransactSetVolumeInformationKind,
FspFsctlTransactQueryDirectoryKind,
FspFsctlTransactFileSystemControlKind,
FspFsctlTransactDeviceControlKind,
FspFsctlTransactShutdownKind,
FspFsctlTransactLockControlKind,
FspFsctlTransactQuerySecurityKind,
FspFsctlTransactSetSecurityKind,
FspFsctlTransactQueryStreamInformationKind,
```
When request processing is complete the Provider must prepare a response and send it to the FSD using `FspFsextProviderTransact` as mentioned above. It is particularly important that the Provider initializes the `Kind` and `Hint` fields by copying the values from the corresponding request.
This document does not describe in detail how each request kind is supposed to be handled. For the full details refer to the implementation for the WinFsp DLL in the WinFsp sources: `src/dll/fsop.c`. Although this implementation is for user mode file systems, similar logic and techniques should be used for Providers.
== Provider Registration
Providers are loaded on demand and must be properly registered:
* A provider must be registered as a kernel driver. This can be achieved by using the command `sc create PROVIDER type=kernel binPath=X:\PATH\TO\PROVIDER.SYS` or by using the Service Control Manager API's (`OpenServiceW`, `CreateServiceW`, etc.). You do not need an INF file or to use the Setup API in order to register a Provider driver.
* A provider must be registered under the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Fsext`. Create a string value with name the textual representation of the Provider's transact code (see `DeviceTransactCode`) in `"%08lx"` format and value the Provider's driver name.
For example the WinFuse Provider registers its driver under the name `WinFuse` and adds a registry value of `00093118` -> `WinFuse`.
== Provider Lifetime
Providers are loaded on demand by the FSD during volume creation. This process works as follows:
* During volume creation (e.g. by using `FspFsctlCreateVolume`) a non-zero `FsextControlCode` must be specified in `VolumeParams`.
* If the FSD sees the `FsextControlCode` as non-zero it attempts to find a corresponding Provider driver.
** It first checks an internal mapping of codes to Provider drivers. If the code is found, the FSD proceeds to the `DeviceInit` step below.
** If the code is not found in the internal mapping, the FSD checks the registry under the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Fsext`. If the code is not found the volume creation fails.
** If the code is found the FSD loads the Provider driver using `ZwLoadDriver`. The Provider is supposed to register itself with the FSD during `DriverEntry` by calling `FspFsextProviderRegister`.
** Finally the internal mapping of codes to Providers is rechecked. Assuming that everything worked as intended, the corresponding Provider driver is now loaded and we can proceed to the `DeviceInit` step.
* The FSD proceeds to call the `DeviceInit` callback of the Provider. The Provider can use this call to initialize itself in relation to the new volume device object.
* Assuming that the volume device object is created successfully, the FSD will do the following:
** Forward any `FsextControlCode==DeviceTransactCode` requests that it gets in its `IRP_MJ_FILE_SYSTEM_CONTROL` to the Provider via `DeviceTransact`.
** Call the Provider's `DeviceExpirationRoutine` once a second as part of the FSD's expiration process.
* Eventually the volume device object will be torn down (e.g. because the corresponding `HANDLE` is closed). In this case the FSD will call the Provider's `DeviceFini` callback.
Finally note that once loaded a Provider driver cannot be unloaded (without a reboot).

View File

@ -1,7 +1,7 @@
/**
* @file tlib/callstack.c
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#include <tlib/callstack.h>

View File

@ -1,7 +1,7 @@
/**
* @file tlib/callstack.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#ifndef TLIB_CALLSTACK_H_INCLUDED

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injected/allfunc.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#ifndef TLIB_INJECTED_ALLFUNC_H_INCLUDED

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injected/curlfunc.c
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#include <tlib/injected/curlfunc.h>

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injected/curlfunc.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#ifndef TLIB_INJECTED_CURLFUNC_H_INCLUDED

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injected/stdfunc.c
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#include <tlib/injected/stdfunc.h>

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injected/stdfunc.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#ifndef TLIB_INJECTED_STDFUNC_H_INCLUDED

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injection.c
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#include <tlib/injection.h>

View File

@ -1,7 +1,7 @@
/**
* @file tlib/injection.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
/* NOTE: This header may usefully be included multiple times.

View File

@ -1,7 +1,7 @@
/**
* @file tlib/testsuite.c
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#include <tlib/testsuite.h>

View File

@ -1,7 +1,7 @@
/**
* @file tlib/testsuite.h
*
* @copyright 2014-2019 Bill Zissimopoulos
* @copyright 2014-2020 Bill Zissimopoulos
*/
#ifndef TLIB_TESTSUITE_H_INCLUDED

View File

@ -6,7 +6,7 @@
* FUSE: Filesystem in Userspace
* Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -6,7 +6,7 @@
* FUSE: Filesystem in Userspace
* Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -6,7 +6,7 @@
* FUSE: Filesystem in Userspace
* Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -2,7 +2,7 @@
* @file fuse/winfsp_fuse.h
* WinFsp FUSE compatible API.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -6,7 +6,7 @@
* FUSE: Filesystem in Userspace
* Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -6,7 +6,7 @@
* FUSE: Filesystem in Userspace
* Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -2,7 +2,7 @@
* @file fuse3/fuse_opt.h
* WinFsp FUSE3 compatible API.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -2,7 +2,7 @@
* @file fuse3/winfsp_fuse.h
* WinFsp FUSE3 compatible API.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file winfsp/fsctl.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -5,7 +5,7 @@
* In order to use the WinFsp Launch API a program must include &lt;winfsp/launch.h&gt;
* and link with the winfsp_x64.dll (or winfsp_x86.dll) library.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -5,7 +5,7 @@
* In order to use the WinFsp API the user mode file system must include &lt;winfsp/winfsp.h&gt;
* and link with the winfsp_x64.dll (or winfsp_x86.dll) library.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -2,7 +2,7 @@
* @file winfsp/winfsp.hpp
* WinFsp C++ Layer.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file fuse/cygfuse.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file fuse3/cygfuse.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file winfsp/fsext.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/debug.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/dirbuf.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/eventlog.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fs.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fsctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fsop.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.
@ -760,7 +760,7 @@ static NTSTATUS FspFileSystemOpCreate_FileOpenTargetDirectory(FSP_FILE_SYSTEM *F
NTSTATUS Result;
WCHAR Root[2] = L"\\";
PWSTR Parent, Suffix;
UINT32 GrantedAccess;
UINT32 CreateOptions, GrantedAccess;
FSP_FSCTL_TRANSACT_FULL_CONTEXT FullContext;
FSP_FSCTL_OPEN_FILE_INFO OpenFileInfo;
UINT32 Information;
@ -775,8 +775,10 @@ static NTSTATUS FspFileSystemOpCreate_FileOpenTargetDirectory(FSP_FILE_SYSTEM *F
OpenFileInfo.NormalizedName = (PVOID)Response->Buffer;
OpenFileInfo.NormalizedNameSize = FSP_FSCTL_TRANSACT_RSP_BUFFER_SIZEMAX;
FspPathSuffix((PWSTR)Request->Buffer, &Parent, &Suffix, Root);
CreateOptions =
(Request->Req.Create.CreateOptions | FILE_DIRECTORY_FILE) & ~FILE_NON_DIRECTORY_FILE;
Result = FileSystem->Interface->Open(FileSystem,
Parent, Request->Req.Create.CreateOptions, GrantedAccess,
Parent, CreateOptions, GrantedAccess,
AddrOfFileContext(FullContext), &OpenFileInfo.FileInfo);
FspPathCombine((PWSTR)Request->Buffer, Suffix);
if (!NT_SUCCESS(Result))

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse_compat.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse_intf.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.
@ -1030,14 +1030,12 @@ static NTSTATUS fsp_fuse_intf_Open(FSP_FILE_SYSTEM *FileSystem,
* Some Windows applications (notably Go programs) specify FILE_APPEND_DATA without
* FILE_WRITE_DATA when opening files for appending. This caused the WinFsp-FUSE layer
* to erroneously pass O_RDONLY to the FUSE file system in such cases. We add a test
* for FILE_APPEND_DATA to ensure that either O_WRONLY or O_RDWR is specified and that
* the O_APPEND flag is set.
* for FILE_APPEND_DATA to ensure that either O_WRONLY or O_RDWR is specified.
*/
if (GrantedAccess & FILE_APPEND_DATA)
{
if (fi.flags == 0)
fi.flags = 1; /* need O_WRONLY as a bare minimum in order to append */
fi.flags |= 8/*O_APPEND*/;
}
if (0 != f->ops.open)

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse_loop.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse_main.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse_opt.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/library.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse3/fuse2to3.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse3/fuse3.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse/fuse3_compat.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/fuse3/library.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/launch.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/library.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/library.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/mount.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/np.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/ntstatus.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/path.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/security.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/service.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/util.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/wksid.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/*
* dotnet/FileSystemBase+Const.cs
*
* Copyright 2015-2019 Bill Zissimopoulos
* Copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/*
* dotnet/FileSystemBase.cs
*
* Copyright 2015-2019 Bill Zissimopoulos
* Copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/*
* dotnet/FileSystemHost.cs
*
* Copyright 2015-2019 Bill Zissimopoulos
* Copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/*
* dotnet/Interop.cs
*
* Copyright 2015-2019 Bill Zissimopoulos
* Copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/*
* dotnet/Service.cs
*
* Copyright 2015-2019 Bill Zissimopoulos
* Copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file fsptool/fsptool.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file ku/library.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -14,7 +14,7 @@
* [SNAME]
* https://www.cygwin.com/cygwin-ug-net/using-specialnames.html
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file dll/uuid5.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file launcher/launchctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file launcher/launcher.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file launcher/ptrans.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file shared/minimal.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -2,7 +2,7 @@
* @file sys/callbacks.c
* Fast I/O and resource acquisition callbacks.
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/cleanup.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/close.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/create.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/debug.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/devctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/device.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/dirctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/driver.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/driver.h
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/ea.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/file.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/fileinfo.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/flush.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/fsctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/fsext.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/iop.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/ioq.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/lockctl.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/meta.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/mountdev.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/mup.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/name.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/psbuffer.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/read.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/security.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

View File

@ -1,7 +1,7 @@
/**
* @file sys/shutdown.c
*
* @copyright 2015-2019 Bill Zissimopoulos
* @copyright 2015-2020 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.

Some files were not shown because too many files have changed in this diff Show More