mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[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 :)
svn path=/trunk/; revision=55689
This commit is contained in:
parent
28f0bba7b4
commit
1966e04ee2
2 changed files with 5 additions and 25 deletions
|
@ -771,25 +771,7 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request)
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -803,6 +785,10 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request)
|
|||
DPRINT1("Shared section map failed: %lx\n", Status);
|
||||
}
|
||||
}
|
||||
else if (ProcessData == CsrRootProcess)
|
||||
{
|
||||
AllowConnection = TRUE;
|
||||
}
|
||||
|
||||
Status = NtAcceptConnectPort(&ServerPort,
|
||||
NULL,
|
||||
|
|
|
@ -494,12 +494,6 @@ CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL,
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue