mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[FASTFAT]
Deny access when trying to overwrite a read-only file. svn path=/trunk/; revision=69880
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user