sys: IRP_MJ_SET_INFORMATION

This commit is contained in:
Bill Zissimopoulos
2016-02-03 17:45:27 -08:00
parent 71eed46e42
commit fcd9945506
2 changed files with 211 additions and 129 deletions

View File

@ -307,8 +307,6 @@ static NTSTATUS FspFsvolCreate(
ClearFlag(FileAttributes, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY);
if (CreateOptions & FILE_DIRECTORY_FILE)
SetFlag(FileAttributes, FILE_ATTRIBUTE_DIRECTORY);
else
ClearFlag(FileAttributes, FILE_ATTRIBUTE_DIRECTORY);
/*
* The new request is associated with our IRP. Go ahead and associate our FileNode/FileDesc
@ -567,7 +565,7 @@ NTSTATUS FspFsvolCreateComplete(
* point though.
*/
BOOLEAN FlushImage =
!FlagOn(Response->Rsp.Create.Opened.FileInfo.FileAttributes, FILE_ATTRIBUTE_DIRECTORY) &&
!FileNode->IsDirectory &&
(FlagOn(Response->Rsp.Create.Opened.GrantedAccess, FILE_WRITE_DATA) ||
BooleanFlagOn(IrpSp->Parameters.Create.Options, FILE_DELETE_ON_CLOSE));
@ -579,12 +577,11 @@ NTSTATUS FspFsvolCreateComplete(
* Oh, noes! We have to go back to user mode to overwrite the file!
*/
/* save the old Request FileAttributes and make them compatible with the open file */
UINT32 FileAttributes = Request->Req.Create.FileAttributes;
if (FlagOn(Response->Rsp.Create.Opened.FileInfo.FileAttributes, FILE_ATTRIBUTE_DIRECTORY))
USHORT FileAttributes = IrpSp->Parameters.Create.FileAttributes;
ClearFlag(FileAttributes, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY);
if (FileNode->IsDirectory)
SetFlag(FileAttributes, FILE_ATTRIBUTE_DIRECTORY);
else
ClearFlag(FileAttributes, FILE_ATTRIBUTE_DIRECTORY);
/* delete the old request */
FspIrpRequest(Irp) = 0;