mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
Don't check inherit flags when checking access.
svn path=/trunk/; revision=28735
This commit is contained in:
parent
5498466cc2
commit
6b8a1ee32c
1 changed files with 5 additions and 1 deletions
|
@ -565,8 +565,11 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
|
|||
{
|
||||
/* Get the granted access and validate it */
|
||||
GrantedAccess = HandleEntry->GrantedAccess;
|
||||
/* Inherit flags are not a kind of access right, they indicate
|
||||
* the disposition of access rights. Therefore, they should not
|
||||
* be considered. */
|
||||
if ((AccessMode == KernelMode) ||
|
||||
!(~GrantedAccess & DesiredAccess))
|
||||
!((~GrantedAccess & DesiredAccess & ~VALID_INHERIT_FLAGS)))
|
||||
{
|
||||
/* Reference the object directly since we have its header */
|
||||
InterlockedIncrement(&ObjectHeader->PointerCount);
|
||||
|
@ -596,6 +599,7 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
|
|||
else
|
||||
{
|
||||
/* Requested access failed */
|
||||
DPRINT("Rights not granted: %x\n", ~GrantedAccess & DesiredAccess);
|
||||
Status = STATUS_ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue