mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -366,7 +366,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
||||
DPRINT("Initialzing Process CID Handle\n");
|
||||
CidEntry.u1.Object = Process;
|
||||
CidEntry.u2.GrantedAccess = 0;
|
||||
Process->UniqueProcessId = (ExCreateHandle(PspCidTable, &CidEntry));
|
||||
Process->UniqueProcessId = ExCreateHandle(PspCidTable, &CidEntry);
|
||||
DPRINT("Created CID: %d\n", Process->UniqueProcessId);
|
||||
if(!Process->UniqueProcessId)
|
||||
{
|
||||
@@ -479,8 +479,8 @@ PsLookupProcessByProcessId(IN HANDLE ProcessId,
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ProcessId)))
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ProcessId)))
|
||||
{
|
||||
/* Get the Process */
|
||||
FoundProcess = CidEntry->u1.Object;
|
||||
@@ -517,7 +517,7 @@ PsLookupProcessThreadByCid(IN PCLIENT_ID Cid,
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
Cid->UniqueThread)))
|
||||
{
|
||||
/* Get the Process */
|
||||
|
||||
@@ -376,8 +376,8 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId,
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the CID Handle Entry */
|
||||
if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ThreadId)))
|
||||
if ((CidEntry = ExMapHandleToPointer(PspCidTable,
|
||||
ThreadId)))
|
||||
{
|
||||
/* Get the Process */
|
||||
FoundThread = CidEntry->u1.Object;
|
||||
|
||||
Reference in New Issue
Block a user