[FASTFAT]

Deny access when trying to overwrite a read-only file.

svn path=/trunk/; revision=69880
This commit is contained in:
Eric Kohl 2015-11-13 19:03:34 +00:00
parent 5b9077f992
commit 014a85563d

View file

@ -411,7 +411,8 @@ VfatOpenFile(
/* Fail, if we try to overwrite a read-only file */
if ((*Fcb->Attributes & FILE_ATTRIBUTE_READONLY) &&
(RequestedDisposition == FILE_OVERWRITE))
(RequestedDisposition == FILE_OVERWRITE ||
RequestedDisposition == FILE_OVERWRITE_IF))
{
vfatReleaseFCB(DeviceExt, Fcb);
return STATUS_ACCESS_DENIED;
@ -580,6 +581,8 @@ VfatCreateFile(
if (!OpenTargetDir)
{
Status = VfatOpenFile(DeviceExt, &PathNameU, FileObject, RequestedDisposition, &ParentFcb);
if (Status == STATUS_ACCESS_DENIED)
return Status;
}
else
{