Author: ekohl
Date: Fri Nov 13 19:03:34 2015
New Revision: 69880
URL:
http://svn.reactos.org/svn/reactos?rev=69880&view=rev
Log:
[FASTFAT]
Deny access when trying to overwrite a read-only file.
Modified:
trunk/reactos/drivers/filesystems/fastfat/create.c
Modified: trunk/reactos/drivers/filesystems/fastfat/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Fri Nov 13 19:03:34
2015
@@ -411,7 +411,8 @@
/* 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 @@
if (!OpenTargetDir)
{
Status = VfatOpenFile(DeviceExt, &PathNameU, FileObject,
RequestedDisposition, &ParentFcb);
+ if (Status == STATUS_ACCESS_DENIED)
+ return Status;
}
else
{