mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 17:32:57 -05:00
sys: IRP_MJ_SET_INFORMATION
This commit is contained in:
@ -116,7 +116,8 @@ static NTSTATUS FspFsvolCreate(
|
||||
USHORT FileAttributes = IrpSp->Parameters.Create.FileAttributes;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor = AccessState->SecurityDescriptor;
|
||||
ULONG SecurityDescriptorSize = 0;
|
||||
LARGE_INTEGER AllocationSize = Irp->Overlay.AllocationSize;
|
||||
UINT64 AllocationSize = Irp->Overlay.AllocationSize.QuadPart;
|
||||
UINT64 AllocationUnit;
|
||||
ACCESS_MASK DesiredAccess = IrpSp->Parameters.Create.SecurityContext->DesiredAccess;
|
||||
USHORT ShareAccess = IrpSp->Parameters.Create.ShareAccess;
|
||||
PFILE_FULL_EA_INFORMATION EaBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||
@ -156,6 +157,11 @@ static NTSTATUS FspFsvolCreate(
|
||||
SecurityDescriptorSize = RtlLengthSecurityDescriptor(SecurityDescriptor);
|
||||
}
|
||||
|
||||
/* align allocation size */
|
||||
AllocationUnit = FsvolDeviceExtension->VolumeParams.SectorSize *
|
||||
FsvolDeviceExtension->VolumeParams.SectorsPerAllocationUnit;
|
||||
AllocationSize = (AllocationSize + AllocationUnit - 1) / AllocationUnit * AllocationUnit;
|
||||
|
||||
/* according to fastfat, filenames that begin with two backslashes are ok */
|
||||
if (sizeof(WCHAR) * 2 <= FileName.Length &&
|
||||
L'\\' == FileName.Buffer[1] && L'\\' == FileName.Buffer[0])
|
||||
@ -323,7 +329,7 @@ static NTSTATUS FspFsvolCreate(
|
||||
Request->Req.Create.SecurityDescriptor.Offset = 0 == SecurityDescriptorSize ? 0 :
|
||||
FSP_FSCTL_DEFAULT_ALIGN_UP(Request->FileName.Size);
|
||||
Request->Req.Create.SecurityDescriptor.Size = (UINT16)SecurityDescriptorSize;
|
||||
Request->Req.Create.AllocationSize = AllocationSize.QuadPart;
|
||||
Request->Req.Create.AllocationSize = AllocationSize;
|
||||
Request->Req.Create.AccessToken = 0;
|
||||
Request->Req.Create.DesiredAccess = DesiredAccess;
|
||||
Request->Req.Create.ShareAccess = ShareAccess;
|
||||
|
Reference in New Issue
Block a user