Author: hpoussin
Date: Sat Jul 1 01:34:53 2006
New Revision: 22728
URL:
http://svn.reactos.org/svn/reactos?rev=22728&view=rev
Log:
In ObOpenObjectByPointer, always pass right mapping to SeCreateAccessState, instead of
relying on a optional/incorrect parameter
Modified:
trunk/reactos/ntoskrnl/ob/obhandle.c
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c Sat Jul 1 01:34:53 2006
@@ -1612,10 +1612,14 @@
IN KPROCESSOR_MODE AccessMode,
OUT PHANDLE Handle)
{
+ POBJECT_HEADER Header;
NTSTATUS Status;
ACCESS_STATE AccessState;
AUX_DATA AuxData;
PAGED_CODE();
+
+ /* Get the Header Info */
+ Header = OBJECT_TO_OBJECT_HEADER(Object);
/* Reference the object */
Status = ObReferenceObjectByPointer(Object,
@@ -1632,7 +1636,7 @@
Status = SeCreateAccessState(&AccessState,
&AuxData,
DesiredAccess,
- &ObjectType->TypeInfo.GenericMapping);
+ &Header->Type->TypeInfo.GenericMapping);
if (!NT_SUCCESS(Status))
{
/* Fail */