mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
sys: IRP_MJ_CREATE
This commit is contained in:
parent
c86c88d15a
commit
5e17f319c9
@ -368,6 +368,7 @@ VOID FspFsvolCreateComplete(
|
|||||||
ULONG SecurityDescriptorSize;
|
ULONG SecurityDescriptorSize;
|
||||||
UNICODE_STRING ReparseFileName;
|
UNICODE_STRING ReparseFileName;
|
||||||
ACCESS_MASK DesiredAccess = IrpSp->Parameters.Create.SecurityContext->DesiredAccess;
|
ACCESS_MASK DesiredAccess = IrpSp->Parameters.Create.SecurityContext->DesiredAccess;
|
||||||
|
PPRIVILEGE_SET Privileges = 0;
|
||||||
USHORT ShareAccess = IrpSp->Parameters.Create.ShareAccess;
|
USHORT ShareAccess = IrpSp->Parameters.Create.ShareAccess;
|
||||||
ULONG Flags = IrpSp->Flags;
|
ULONG Flags = IrpSp->Flags;
|
||||||
KPROCESSOR_MODE RequestorMode =
|
KPROCESSOR_MODE RequestorMode =
|
||||||
@ -458,7 +459,7 @@ VOID FspFsvolCreateComplete(
|
|||||||
FALSE,
|
FALSE,
|
||||||
DesiredAccess,
|
DesiredAccess,
|
||||||
AccessState->PreviouslyGrantedAccess,
|
AccessState->PreviouslyGrantedAccess,
|
||||||
0,
|
&Privileges,
|
||||||
IoGetFileObjectGenericMapping(),
|
IoGetFileObjectGenericMapping(),
|
||||||
RequestorMode,
|
RequestorMode,
|
||||||
&GrantedAccess,
|
&GrantedAccess,
|
||||||
@ -468,6 +469,17 @@ VOID FspFsvolCreateComplete(
|
|||||||
FSP_RETURN();
|
FSP_RETURN();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 != Privileges)
|
||||||
|
{
|
||||||
|
Result = SeAppendPrivileges(AccessState, Privileges);
|
||||||
|
SeFreePrivileges(Privileges);
|
||||||
|
if (!NT_SUCCESS(Result))
|
||||||
|
{
|
||||||
|
FspFsvolCreateClose(Irp, Response);
|
||||||
|
FSP_RETURN();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetFlag(AccessState->PreviouslyGrantedAccess, GrantedAccess);
|
SetFlag(AccessState->PreviouslyGrantedAccess, GrantedAccess);
|
||||||
ClearFlag(AccessState->RemainingDesiredAccess, GrantedAccess);
|
ClearFlag(AccessState->RemainingDesiredAccess, GrantedAccess);
|
||||||
}
|
}
|
||||||
|
@ -226,6 +226,8 @@ static VOID FspFsvolDeviceFini(PDEVICE_OBJECT DeviceObject)
|
|||||||
|
|
||||||
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(DeviceObject);
|
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(DeviceObject);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* FspFsvolDeviceFreeElement is now a no-op, so this is no longer necessary */
|
||||||
/*
|
/*
|
||||||
* Enumerate and delete all entries in the GenericTable.
|
* Enumerate and delete all entries in the GenericTable.
|
||||||
* There is no need to protect accesses to the table as we are in the device destructor.
|
* There is no need to protect accesses to the table as we are in the device destructor.
|
||||||
@ -233,6 +235,7 @@ static VOID FspFsvolDeviceFini(PDEVICE_OBJECT DeviceObject)
|
|||||||
FSP_DEVICE_GENERIC_TABLE_ELEMENT_DATA *Element;
|
FSP_DEVICE_GENERIC_TABLE_ELEMENT_DATA *Element;
|
||||||
while (0 != (Element = RtlGetElementGenericTableAvl(&FsvolDeviceExtension->GenericTable, 0)))
|
while (0 != (Element = RtlGetElementGenericTableAvl(&FsvolDeviceExtension->GenericTable, 0)))
|
||||||
RtlDeleteElementGenericTableAvl(&FsvolDeviceExtension->GenericTable, &Element->Identifier);
|
RtlDeleteElementGenericTableAvl(&FsvolDeviceExtension->GenericTable, &Element->Identifier);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dereference the virtual volume device so that it can now go away.
|
* Dereference the virtual volume device so that it can now go away.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user