mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-24 09:23:37 -05:00
sys: FspDeviceCreateSecure: add DeviceCharacteristics parameter
This commit is contained in:
parent
e973274d1c
commit
f3c6609308
@ -7,11 +7,11 @@
|
||||
#include <sys/driver.h>
|
||||
|
||||
NTSTATUS FspDeviceCreateSecure(UINT32 Kind, ULONG ExtraSize,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PUNICODE_STRING DeviceSddl, LPCGUID DeviceClassGuid,
|
||||
PDEVICE_OBJECT *PDeviceObject);
|
||||
NTSTATUS FspDeviceCreate(UINT32 Kind, ULONG ExtraSize,
|
||||
DEVICE_TYPE DeviceType,
|
||||
DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PDEVICE_OBJECT *PDeviceObject);
|
||||
NTSTATUS FspDeviceInitialize(PDEVICE_OBJECT DeviceObject);
|
||||
VOID FspDeviceDelete(PDEVICE_OBJECT DeviceObject);
|
||||
@ -97,7 +97,7 @@ VOID FspDeviceDeleteAll(VOID);
|
||||
#endif
|
||||
|
||||
NTSTATUS FspDeviceCreateSecure(UINT32 Kind, ULONG ExtraSize,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PUNICODE_STRING DeviceSddl, LPCGUID DeviceClassGuid,
|
||||
PDEVICE_OBJECT *PDeviceObject)
|
||||
{
|
||||
@ -127,13 +127,13 @@ NTSTATUS FspDeviceCreateSecure(UINT32 Kind, ULONG ExtraSize,
|
||||
if (0 != DeviceSddl)
|
||||
Result = IoCreateDeviceSecure(FspDriverObject,
|
||||
DeviceExtensionSize + ExtraSize, DeviceName, DeviceType,
|
||||
FILE_DEVICE_SECURE_OPEN, FALSE,
|
||||
DeviceCharacteristics, FALSE,
|
||||
DeviceSddl, DeviceClassGuid,
|
||||
&DeviceObject);
|
||||
else
|
||||
Result = IoCreateDevice(FspDriverObject,
|
||||
DeviceExtensionSize + ExtraSize, DeviceName, DeviceType,
|
||||
0, FALSE,
|
||||
DeviceCharacteristics, FALSE,
|
||||
&DeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
@ -149,12 +149,13 @@ NTSTATUS FspDeviceCreateSecure(UINT32 Kind, ULONG ExtraSize,
|
||||
}
|
||||
|
||||
NTSTATUS FspDeviceCreate(UINT32 Kind, ULONG ExtraSize,
|
||||
DEVICE_TYPE DeviceType,
|
||||
DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PDEVICE_OBJECT *PDeviceObject)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
return FspDeviceCreateSecure(Kind, ExtraSize, 0, DeviceType, 0, 0, PDeviceObject);
|
||||
return FspDeviceCreateSecure(Kind, ExtraSize, 0, DeviceType, DeviceCharacteristics,
|
||||
0, 0, PDeviceObject);
|
||||
}
|
||||
|
||||
NTSTATUS FspDeviceInitialize(PDEVICE_OBJECT DeviceObject)
|
||||
|
@ -43,14 +43,14 @@ NTSTATUS DriverEntry(
|
||||
RtlInitUnicodeString(&DeviceSddl, L"" FSP_FSCTL_DEVICE_SDDL);
|
||||
RtlInitUnicodeString(&DeviceName, L"\\Device\\" FSP_FSCTL_DISK_DEVICE_NAME);
|
||||
Result = FspDeviceCreateSecure(FspFsctlDeviceExtensionKind, 0,
|
||||
&DeviceName, FILE_DEVICE_DISK_FILE_SYSTEM,
|
||||
&DeviceName, FILE_DEVICE_DISK_FILE_SYSTEM, FILE_DEVICE_SECURE_OPEN,
|
||||
&DeviceSddl, &FspFsctlDeviceClassGuid,
|
||||
&FspFsctlDiskDeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
FSP_RETURN();
|
||||
RtlInitUnicodeString(&DeviceName, L"\\Device\\" FSP_FSCTL_NET_DEVICE_NAME);
|
||||
Result = FspDeviceCreateSecure(FspFsctlDeviceExtensionKind, 0,
|
||||
&DeviceName, FILE_DEVICE_NETWORK_FILE_SYSTEM,
|
||||
&DeviceName, FILE_DEVICE_NETWORK_FILE_SYSTEM, FILE_DEVICE_SECURE_OPEN,
|
||||
&DeviceSddl, &FspFsctlDeviceClassGuid,
|
||||
&FspFsctlNetDeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
@ -757,11 +757,11 @@ FSP_FSVOL_DEVICE_EXTENSION *FspFsvolDeviceExtension(PDEVICE_OBJECT DeviceObject)
|
||||
return DeviceObject->DeviceExtension;
|
||||
}
|
||||
NTSTATUS FspDeviceCreateSecure(UINT32 Kind, ULONG ExtraSize,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType,
|
||||
PUNICODE_STRING DeviceName, DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PUNICODE_STRING DeviceSddl, LPCGUID DeviceClassGuid,
|
||||
PDEVICE_OBJECT *PDeviceObject);
|
||||
NTSTATUS FspDeviceCreate(UINT32 Kind, ULONG ExtraSize,
|
||||
DEVICE_TYPE DeviceType,
|
||||
DEVICE_TYPE DeviceType, ULONG DeviceCharacteristics,
|
||||
PDEVICE_OBJECT *PDeviceObject);
|
||||
NTSTATUS FspDeviceInitialize(PDEVICE_OBJECT DeviceObject);
|
||||
VOID FspDeviceDelete(PDEVICE_OBJECT DeviceObject);
|
||||
|
@ -136,14 +136,14 @@ NTSTATUS FspVolumeCreate(
|
||||
|
||||
/* create the volume (and virtual disk) device(s) */
|
||||
Result = FspDeviceCreate(FspFsvolDeviceExtensionKind, 0,
|
||||
FsctlDeviceObject->DeviceType,
|
||||
FsctlDeviceObject->DeviceType, 0,
|
||||
&FsvolDeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
if (FILE_DEVICE_DISK_FILE_SYSTEM == FsctlDeviceObject->DeviceType)
|
||||
{
|
||||
Result = FspDeviceCreateSecure(FspFsvrtDeviceExtensionKind, 0,
|
||||
&VolumeName, FILE_DEVICE_VIRTUAL_DISK,
|
||||
&VolumeName, FILE_DEVICE_VIRTUAL_DISK, 0,
|
||||
&DeviceSddl, &FspFsvrtDeviceClassGuid,
|
||||
&FsvrtDeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
Loading…
x
Reference in New Issue
Block a user