mirror of
https://github.com/reactos/reactos.git
synced 2024-07-03 11:14:33 +00:00
In ObOpenObjectByPointer, always pass right mapping to SeCreateAccessState, instead of relying on a optional/incorrect parameter
svn path=/trunk/; revision=22728
This commit is contained in:
parent
d3ccc7eb41
commit
f8b990739a
|
@ -1612,11 +1612,15 @@ ObOpenObjectByPointer(IN PVOID Object,
|
|||
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,
|
||||
0,
|
||||
|
@ -1632,7 +1636,7 @@ ObOpenObjectByPointer(IN PVOID Object,
|
|||
Status = SeCreateAccessState(&AccessState,
|
||||
&AuxData,
|
||||
DesiredAccess,
|
||||
&ObjectType->TypeInfo.GenericMapping);
|
||||
&Header->Type->TypeInfo.GenericMapping);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* Fail */
|
||||
|
|
Loading…
Reference in a new issue