Author: ion
Date: Wed Aug 3 05:58:58 2011
New Revision: 53043
URL:
http://svn.reactos.org/svn/reactos?rev=53043&view=rev
Log:
[CSRSRV]: Try to see why it appears some processes don't have a handle in their
CSR_PROCESS_DATA....
Modified:
trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/process.c [iso-8859-1] Wed Aug 3
05:58:58 2011
@@ -105,6 +105,7 @@
PROCESS_ALL_ACCESS,
&ObjectAttributes,
&ClientId);
+ DPRINT1("CSR PRocess: %p Handle: %p\n", pProcessData,
pProcessData->Process);
if (!NT_SUCCESS(Status))
{
ProcessData[hash] = pProcessData->next;
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c [iso-8859-1] Wed Aug 3
05:58:58 2011
@@ -282,6 +282,7 @@
if (CsrProcess)
{
/* Map the sectio into this process */
+ DPRINT1("CSR Process Handle: %p. CSR Process: %p\n",
CsrProcess->Process, CsrProcess);
Status = NtMapViewOfSection(CsrSrvSharedSection,
CsrProcess->Process,
&CsrSrvSharedSectionBase,
@@ -437,6 +438,24 @@
DPRINT1("Unable to allocate or find data for process 0x%x\n",
Request->ClientId.UniqueProcess);
}
+ }
+
+ if (ProcessData->Process == NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ NULL,
+ 0,
+ NULL,
+ NULL);
+ DPRINT1("WARNING: CSR PROCESS WITH NO CSR PROCESS HANDLE???\n");
+ ClientId.UniqueThread = 0;
+ Status = NtOpenProcess(&ProcessData->Process,
+ PROCESS_ALL_ACCESS,
+ &ObjectAttributes,
+ &Request->ClientId);
+ DPRINT1("Status: %lx. Handle: %lx\n", Status,
ProcessData->Process);
}
if (ProcessData)