mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 11:22:58 +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 */
|
/* Get the granted access and validate it */
|
||||||
GrantedAccess = HandleEntry->GrantedAccess;
|
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) ||
|
if ((AccessMode == KernelMode) ||
|
||||||
!(~GrantedAccess & DesiredAccess))
|
!((~GrantedAccess & DesiredAccess & ~VALID_INHERIT_FLAGS)))
|
||||||
{
|
{
|
||||||
/* Reference the object directly since we have its header */
|
/* Reference the object directly since we have its header */
|
||||||
InterlockedIncrement(&ObjectHeader->PointerCount);
|
InterlockedIncrement(&ObjectHeader->PointerCount);
|
||||||
|
@ -596,6 +599,7 @@ ObReferenceObjectByHandle(IN HANDLE Handle,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Requested access failed */
|
/* Requested access failed */
|
||||||
|
DPRINT("Rights not granted: %x\n", ~GrantedAccess & DesiredAccess);
|
||||||
Status = STATUS_ACCESS_DENIED;
|
Status = STATUS_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue