mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
dll: FSP_FILE_SYSTEM
This commit is contained in:
@ -24,7 +24,7 @@ static NTSTATUS FspGetFileSecurityDescriptor(FSP_FILE_SYSTEM *FileSystem,
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
NTSTATUS Result = FileSystem->QuerySecurity(FileSystem,
|
||||
NTSTATUS Result = FileSystem->Interface->QuerySecurity(FileSystem,
|
||||
FileName,
|
||||
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
|
||||
*PSecurityDescriptor, PSecurityDescriptorSize);
|
||||
@ -42,10 +42,10 @@ FSP_API NTSTATUS FspAccessCheck(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, BOOLEAN AllowTraverseCheck, DWORD DesiredAccess,
|
||||
PDWORD PGrantedAccess)
|
||||
{
|
||||
if (0 != FileSystem->AccessCheck)
|
||||
return FileSystem->AccessCheck(FileSystem, Request, DesiredAccess, PGrantedAccess);
|
||||
if (0 != FileSystem->Interface->AccessCheck)
|
||||
return FileSystem->Interface->AccessCheck(FileSystem, Request, DesiredAccess, PGrantedAccess);
|
||||
|
||||
if (0 == FileSystem->QuerySecurity)
|
||||
if (0 == FileSystem->Interface->QuerySecurity)
|
||||
{
|
||||
*PGrantedAccess = DesiredAccess;
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -14,7 +14,7 @@ typedef struct _FSP_DISPATCHER_WORK_ITEM
|
||||
|
||||
FSP_API NTSTATUS FspFileSystemCreate(PWSTR DevicePath,
|
||||
const FSP_FSCTL_VOLUME_PARAMS *VolumeParams,
|
||||
FSP_FILE_SYSTEM_DISPATCHER *Dispatcher,
|
||||
const FSP_FILE_SYSTEM_INTERFACE *Interface,
|
||||
FSP_FILE_SYSTEM **PFileSystem)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
@ -22,6 +22,9 @@ FSP_API NTSTATUS FspFileSystemCreate(PWSTR DevicePath,
|
||||
|
||||
*PFileSystem = 0;
|
||||
|
||||
if (0 == Interface)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
FileSystem = MemAlloc(sizeof *FileSystem);
|
||||
if (0 == FileSystem)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
@ -36,7 +39,10 @@ FSP_API NTSTATUS FspFileSystemCreate(PWSTR DevicePath,
|
||||
return Result;
|
||||
}
|
||||
|
||||
FileSystem->Dispatcher = 0 != Dispatcher ? Dispatcher : FspFileSystemDirectDispatcher;
|
||||
FileSystem->Dispatcher = FspFileSystemDirectDispatcher;
|
||||
FileSystem->Operations[FspFsctlTransactCreateKind] = 0;
|
||||
// !!!: ...
|
||||
FileSystem->Interface = Interface;
|
||||
|
||||
*PFileSystem = FileSystem;
|
||||
|
||||
|
Reference in New Issue
Block a user