projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b9077f
)
[FASTFAT]
author
Eric Kohl
<eric.kohl@reactos.org>
Fri, 13 Nov 2015 19:03:34 +0000
(19:03 +0000)
committer
Eric Kohl
<eric.kohl@reactos.org>
Fri, 13 Nov 2015 19:03:34 +0000
(19:03 +0000)
Deny access when trying to overwrite a read-only file.
svn path=/trunk/; revision=69880
reactos/drivers/filesystems/fastfat/create.c
patch
|
blob
|
history
diff --git
a/reactos/drivers/filesystems/fastfat/create.c
b/reactos/drivers/filesystems/fastfat/create.c
index
eef10de
..
8c68650
100644
(file)
--- a/
reactos/drivers/filesystems/fastfat/create.c
+++ b/
reactos/drivers/filesystems/fastfat/create.c
@@
-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
{