[ros-diffs] [arty] 28735: Don't check inherit flags when checking access.

arty at svn.reactos.org arty at svn.reactos.org
Sat Sep 1 12:04:16 CEST 2007


Author: arty
Date: Sat Sep  1 14:04:15 2007
New Revision: 28735

URL: http://svn.reactos.org/svn/reactos?rev=28735&view=rev
Log:
Don't check inherit flags when checking access.

Modified:
    trunk/reactos/ntoskrnl/ob/obref.c

Modified: trunk/reactos/ntoskrnl/ob/obref.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=28735&r1=28734&r2=28735&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obref.c (original)
+++ trunk/reactos/ntoskrnl/ob/obref.c Sat Sep  1 14:04:15 2007
@@ -565,8 +565,11 @@
         {
             /* 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 @@
             else
             {
                 /* Requested access failed */
+                DPRINT("Rights not granted: %x\n", ~GrantedAccess & DesiredAccess);
                 Status = STATUS_ACCESS_DENIED;
             }
         }




More information about the Ros-diffs mailing list