From 234a0110289ce684400933864df63852e59dcaed Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 18 Apr 2005 05:25:07 +0000 Subject: [PATCH] Fix Access Bug. cmd.exe and taskmgr work again, but there remains a bug with the process list svn path=/trunk/; revision=14666 --- reactos/ntoskrnl/ke/process.c | 4 ++-- reactos/ntoskrnl/ps/kill.c | 4 ++-- reactos/ntoskrnl/ps/process.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/ke/process.c b/reactos/ntoskrnl/ke/process.c index a03f271fda0..23f1d72db28 100644 --- a/reactos/ntoskrnl/ke/process.c +++ b/reactos/ntoskrnl/ke/process.c @@ -70,7 +70,7 @@ KeInitializeProcess(PKPROCESS Process, KAFFINITY Affinity, 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 */ KeInitializeDispatcherHeader(&Process->DispatcherHeader, @@ -89,7 +89,7 @@ KeInitializeProcess(PKPROCESS Process, /* Initialize the Thread List */ 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 diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index 5249024b9e8..3d66eff6197 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -151,7 +151,7 @@ PspDeleteProcess(PVOID ObjectBody) { PEPROCESS Process = (PEPROCESS)ObjectBody; - DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process); + DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process->UniqueProcessId); /* Delete the CID Handle */ if(Process->UniqueProcessId != NULL) { @@ -291,7 +291,7 @@ PspExitThread(NTSTATUS ExitStatus) /* Free the TEB */ if((Teb = CurrentThread->Tcb.Teb)) { - DPRINT1("Decommit teb at %p\n", Teb); + DPRINT("Decommit teb at %p\n", Teb); MmDeleteTeb(CurrentProcess, Teb); CurrentThread->Tcb.Teb = NULL; } diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index baf9b222381..d29572a06f5 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -872,7 +872,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle, if (ClientId->UniqueThread) { /* Get the Process */ - DPRINT("Opening by Thread ID\n"); + DPRINT("Opening by Thread ID: %x\n", ClientId->UniqueThread); Status = PsLookupProcessThreadByCid(ClientId, &Process, &Thread); @@ -881,7 +881,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle, else { /* Get the Process */ - DPRINT("Opening by Process ID\n"); + DPRINT("Opening by Process ID: %x\n", ClientId->UniqueProcess); Status = PsLookupProcessByProcessId(ClientId->UniqueProcess, &Process); DPRINT("Found: %x\n", Process); @@ -897,7 +897,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle, Status = ObOpenObjectByPointer(Process, ObjectAttributes->Attributes, NULL, - 0, + DesiredAccess, PsProcessType, PreviousMode, ProcessHandle);