Fix Access Bug. cmd.exe and taskmgr work again, but there remains a bug
with the process list
Modified: trunk/reactos/ntoskrnl/ke/process.c
Modified: trunk/reactos/ntoskrnl/ps/kill.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
_____
Modified: trunk/reactos/ntoskrnl/ke/process.c
--- trunk/reactos/ntoskrnl/ke/process.c 2005-04-18 05:12:36 UTC (rev
14665)
+++ trunk/reactos/ntoskrnl/ke/process.c 2005-04-18 05:25:07 UTC (rev
14666)
@@ -70,7 +70,7 @@
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 @@
/* 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
_____
Modified: trunk/reactos/ntoskrnl/ps/kill.c
--- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 05:12:36 UTC (rev
14665)
+++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 05:25:07 UTC (rev
14666)
@@ -151,7 +151,7 @@
{
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 @@
/* 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;
}
_____
Modified: trunk/reactos/ntoskrnl/ps/process.c
--- trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 05:12:36 UTC (rev
14665)
+++ trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 05:25:07 UTC (rev
14666)
@@ -872,7 +872,7 @@
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 @@
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 @@
Status = ObOpenObjectByPointer(Process,
ObjectAttributes->Attributes,
NULL,
- 0,
+ DesiredAccess,
PsProcessType,
PreviousMode,
ProcessHandle);