mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
unlock the CID in PsLookupProcessByProcessId, PsLookupProcessThreadByCid and PsLookupThreadByThreadId when the lookup succeeded, not failed
svn path=/trunk/; revision=17196
This commit is contained in:
parent
f61e4f1230
commit
e138304bf5
2 changed files with 6 additions and 6 deletions
|
@ -366,7 +366,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
||||||
DPRINT("Initialzing Process CID Handle\n");
|
DPRINT("Initialzing Process CID Handle\n");
|
||||||
CidEntry.u1.Object = Process;
|
CidEntry.u1.Object = Process;
|
||||||
CidEntry.u2.GrantedAccess = 0;
|
CidEntry.u2.GrantedAccess = 0;
|
||||||
Process->UniqueProcessId = (ExCreateHandle(PspCidTable, &CidEntry));
|
Process->UniqueProcessId = ExCreateHandle(PspCidTable, &CidEntry);
|
||||||
DPRINT("Created CID: %d\n", Process->UniqueProcessId);
|
DPRINT("Created CID: %d\n", Process->UniqueProcessId);
|
||||||
if(!Process->UniqueProcessId)
|
if(!Process->UniqueProcessId)
|
||||||
{
|
{
|
||||||
|
@ -479,7 +479,7 @@ PsLookupProcessByProcessId(IN HANDLE ProcessId,
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Get the CID Handle Entry */
|
/* Get the CID Handle Entry */
|
||||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||||
ProcessId)))
|
ProcessId)))
|
||||||
{
|
{
|
||||||
/* Get the Process */
|
/* Get the Process */
|
||||||
|
@ -517,7 +517,7 @@ PsLookupProcessThreadByCid(IN PCLIENT_ID Cid,
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Get the CID Handle Entry */
|
/* Get the CID Handle Entry */
|
||||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||||
Cid->UniqueThread)))
|
Cid->UniqueThread)))
|
||||||
{
|
{
|
||||||
/* Get the Process */
|
/* Get the Process */
|
||||||
|
|
|
@ -376,7 +376,7 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId,
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Get the CID Handle Entry */
|
/* Get the CID Handle Entry */
|
||||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||||
ThreadId)))
|
ThreadId)))
|
||||||
{
|
{
|
||||||
/* Get the Process */
|
/* Get the Process */
|
||||||
|
|
Loading…
Reference in a new issue