mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[FASTFAT]
Deny access when trying to overwrite a read-only file. svn path=/trunk/; revision=69880
This commit is contained in:
parent
5b9077f992
commit
014a85563d
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue