sys: FspFileNodeRename: correctly handle rename of closed by referenced descendant files

This commit is contained in:
Bill Zissimopoulos
2016-10-12 23:52:54 -07:00
parent 249c1a5cb8
commit 42745e2239
3 changed files with 197 additions and 12 deletions

View File

@ -1229,9 +1229,8 @@ static NTSTATUS FspFsvolSetRenameInformationSuccess(
NewFileName.Length = NewFileName.MaximumLength =
Request->Req.SetInformation.Info.Rename.NewFileName.Size - sizeof(WCHAR);
NewFileName.Buffer = FspAllocMustSucceed(NewFileName.Length);
RtlCopyMemory(NewFileName.Buffer, Request->Buffer + Request->FileName.Size, NewFileName.Length);
NewFileName.Buffer = (PVOID)
(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset);
FspFileNodeRename(FileNode, &NewFileName);
/* fastfat has some really arcane rules on rename notifications; simplify! */