sys: POSIX rename improvements

This commit is contained in:
Bill Zissimopoulos
2021-11-25 10:35:22 +00:00
parent c4f994f8f6
commit 00219f29cf
3 changed files with 58 additions and 1 deletions

View File

@ -1342,7 +1342,7 @@ NTSTATUS FspFileNodeRenameCheck(PDEVICE_OBJECT FsvolDeviceObject, PIRP OplockIrp
* "rename" resource exclusively, which disallows new Opens.
*/
if (!PosixRename && !CheckingOldName)
if (!CheckingOldName)
{
/* replaced file cannot be a directory or mapped as an image */
for (

View File

@ -1691,6 +1691,12 @@ retry:
FspFsvolDeviceFileRenameAcquireExclusive(FsvolDeviceObject);
FspFileNodeAcquireExclusive(FileNode, Full);
if (FileNode->PosixDelete)
{
Result = STATUS_ACCESS_DENIED;
goto unlock_exit;
}
if (0 == Request)
{
if (0 != TargetFileNode)