Author: ion
Date: Sun Feb 19 00:04:05 2012
New Revision: 55689
URL:
http://svn.reactos.org/svn/reactos?rev=55689&view=rev
Log:
[CSRSRV]: Remove a bunch of hacks and don't attach the shared section when CSRSS is
connecting to itself (which happens because our Win32k does that). Things are cleaner now
:)
Modified:
trunk/reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
trunk/reactos/subsystems/win32/csrss/csrsrv/server.c
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] Sun Feb 19
00:04:05 2012
@@ -771,25 +771,7 @@
}
}
- if (ProcessData->ProcessHandle == 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->ProcessHandle,
- PROCESS_ALL_ACCESS,
- &ObjectAttributes,
- &Request->ClientId);
- DPRINT1("Status: %lx. Handle: %lx\n", Status,
ProcessData->ProcessHandle);
- }
-
- if (ProcessData)
+ if ((ProcessData) && (ProcessData != CsrRootProcess))
{
/* Attach the Shared Section */
Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo);
@@ -802,6 +784,10 @@
{
DPRINT1("Shared section map failed: %lx\n", Status);
}
+ }
+ else if (ProcessData == CsrRootProcess)
+ {
+ AllowConnection = TRUE;
}
Status = NtAcceptConnectPort(&ServerPort,
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/server.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/server.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/server.c [iso-8859-1] Sun Feb 19 00:04:05
2012
@@ -494,12 +494,6 @@
ViewUnmap,
SEC_NO_CHANGE,
PAGE_EXECUTE_READ);
- if (Status == STATUS_CONFLICTING_ADDRESSES)
- {
- /* I Think our csrss tries to connect to itself... */
- DPRINT1("Multiple mapping hack\n");
- Status = STATUS_SUCCESS;
- }
if (!NT_SUCCESS(Status)) return Status;
}