Fix Access Bug. cmd.exe and taskmgr work again, but there remains a bug with the process list

svn path=/trunk/; revision=14666
This commit is contained in:
Alex Ionescu 2005-04-18 05:25:07 +00:00
parent 2b66d8f4fb
commit 234a011028
3 changed files with 7 additions and 7 deletions

View file

@ -70,7 +70,7 @@ KeInitializeProcess(PKPROCESS Process,
KAFFINITY Affinity, KAFFINITY Affinity,
LARGE_INTEGER DirectoryTableBase) LARGE_INTEGER DirectoryTableBase)
{ {
DPRINT1("KeInitializeProcess. Process: %x, DirectoryTableBase: %x\n", Process, DirectoryTableBase); DPRINT("KeInitializeProcess. Process: %x, DirectoryTableBase: %x\n", Process, DirectoryTableBase);
/* Initialize the Dispatcher Header */ /* Initialize the Dispatcher Header */
KeInitializeDispatcherHeader(&Process->DispatcherHeader, KeInitializeDispatcherHeader(&Process->DispatcherHeader,
@ -89,7 +89,7 @@ KeInitializeProcess(PKPROCESS Process,
/* Initialize the Thread List */ /* Initialize the Thread List */
InitializeListHead(&Process->ThreadListHead); InitializeListHead(&Process->ThreadListHead);
DPRINT1("The Process has now been initalized with the Kernel\n"); DPRINT("The Process has now been initalized with the Kernel\n");
} }
ULONG ULONG

View file

@ -151,7 +151,7 @@ PspDeleteProcess(PVOID ObjectBody)
{ {
PEPROCESS Process = (PEPROCESS)ObjectBody; PEPROCESS Process = (PEPROCESS)ObjectBody;
DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process); DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process->UniqueProcessId);
/* Delete the CID Handle */ /* Delete the CID Handle */
if(Process->UniqueProcessId != NULL) { if(Process->UniqueProcessId != NULL) {
@ -291,7 +291,7 @@ PspExitThread(NTSTATUS ExitStatus)
/* Free the TEB */ /* Free the TEB */
if((Teb = CurrentThread->Tcb.Teb)) { if((Teb = CurrentThread->Tcb.Teb)) {
DPRINT1("Decommit teb at %p\n", Teb); DPRINT("Decommit teb at %p\n", Teb);
MmDeleteTeb(CurrentProcess, Teb); MmDeleteTeb(CurrentProcess, Teb);
CurrentThread->Tcb.Teb = NULL; CurrentThread->Tcb.Teb = NULL;
} }

View file

@ -872,7 +872,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle,
if (ClientId->UniqueThread) if (ClientId->UniqueThread)
{ {
/* Get the Process */ /* Get the Process */
DPRINT("Opening by Thread ID\n"); DPRINT("Opening by Thread ID: %x\n", ClientId->UniqueThread);
Status = PsLookupProcessThreadByCid(ClientId, Status = PsLookupProcessThreadByCid(ClientId,
&Process, &Process,
&Thread); &Thread);
@ -881,7 +881,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle,
else else
{ {
/* Get the Process */ /* Get the Process */
DPRINT("Opening by Process ID\n"); DPRINT("Opening by Process ID: %x\n", ClientId->UniqueProcess);
Status = PsLookupProcessByProcessId(ClientId->UniqueProcess, Status = PsLookupProcessByProcessId(ClientId->UniqueProcess,
&Process); &Process);
DPRINT("Found: %x\n", Process); DPRINT("Found: %x\n", Process);
@ -897,7 +897,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle,
Status = ObOpenObjectByPointer(Process, Status = ObOpenObjectByPointer(Process,
ObjectAttributes->Attributes, ObjectAttributes->Attributes,
NULL, NULL,
0, DesiredAccess,
PsProcessType, PsProcessType,
PreviousMode, PreviousMode,
ProcessHandle); ProcessHandle);