mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 05:01:03 +00:00
[NTOS:IO] Do not set Shared property of the file if we are failing in IoCheckShareAccess
This commit is contained in:
parent
115b8290cd
commit
1d1dba51db
1 changed files with 5 additions and 5 deletions
|
@ -3429,11 +3429,6 @@ IoCheckShareAccess(IN ACCESS_MASK DesiredAccess,
|
|||
SharedWrite = (DesiredShareAccess & FILE_SHARE_WRITE) != 0;
|
||||
SharedDelete = (DesiredShareAccess & FILE_SHARE_DELETE) != 0;
|
||||
|
||||
/* Set them */
|
||||
FileObject->SharedRead = SharedRead;
|
||||
FileObject->SharedWrite = SharedWrite;
|
||||
FileObject->SharedDelete = SharedDelete;
|
||||
|
||||
/* Check if the shared access is violated */
|
||||
if ((ReadAccess &&
|
||||
(ShareAccess->SharedRead < ShareAccess->OpenCount)) ||
|
||||
|
@ -3449,6 +3444,11 @@ IoCheckShareAccess(IN ACCESS_MASK DesiredAccess,
|
|||
return STATUS_SHARING_VIOLATION;
|
||||
}
|
||||
|
||||
/* Set them */
|
||||
FileObject->SharedRead = SharedRead;
|
||||
FileObject->SharedWrite = SharedWrite;
|
||||
FileObject->SharedDelete = SharedDelete;
|
||||
|
||||
/* It's not, check if caller wants us to update it */
|
||||
if (Update)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue