[ros-dev] A question about SepCreateSystemProcessToken

Xiaoming Gao gxm.reactos at gmail.com
Mon Mar 24 02:32:42 CET 2008


SepCreateSystemProcessToken calls ObCreateObject like this:

Status = ObCreateObject(KernelMode,
                          SepTokenObjectType,
                          NULL,
                          KernelMode,
                          NULL,
                          sizeof(TOKEN),
                          0,
                          0,
                          (PVOID*)&AccessToken);

the ObjectAttributes parameter is set to NULL,and ObCreateObject passes
ObjectAttributes to call ObpCaptureObjectAttributes like this:

Status = ObpCaptureObjectAttributes(ObjectAttributes,
                                        ProbeMode,
                                        FALSE,
                                        ObjectCreateInfo,
                                        &ObjectName);

and in ObpCaptureObjectAttributes ,there's a check condition that checks if
ObjectAttributes is NULL, if ObjectAttributes is NULL,it will cause
ObpCaptureObjectAttributes fail,and then cause ObCreateObject fail,then
cause SepCreateSystemProcessToken fail,and the return value of
SepCreateSystemProcessToken will ever be NULL.

Could someone explain why???am i wrong??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-dev/attachments/20080324/c00122a9/attachment.html 


More information about the Ros-dev mailing list