Author: ion
Date: Thu Aug 29 00:02:15 2013
New Revision: 59864
URL:
http://svn.reactos.org/svn/reactos?rev=59864&view=rev
Log:
[NTDLL]: Fix CsrpConnectToServer to use the correct CSR_API_CONNECTINFO structure.
[CSRSRV]: Fix definition of CSR_API_CONNECTINFO structure. It is now compatible with
Server 2003. Also, set the DebugFlag.
Modified:
trunk/reactos/dll/ntdll/csr/connect.c
trunk/reactos/include/reactos/subsys/csr/csrmsg.h
trunk/reactos/subsystems/win32/csrsrv/api.c
trunk/reactos/subsystems/win32/csrsrv/server.c
Modified: trunk/reactos/dll/ntdll/csr/connect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/csr/connect.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] Thu Aug 29 00:02:15 2013
@@ -107,7 +107,7 @@
SecurityQos.EffectiveOnly = TRUE;
/* Setup the connection info */
- ConnectionInfo.Version = CSRSRV_VERSION;
+ ConnectionInfo.DebugFlags = 0;
/* Create a SID for us */
Status = RtlAllocateAndInitializeSid(&NtSidAuthority,
@@ -153,12 +153,12 @@
(ULONG_PTR)LpcWrite.ViewBase;
/* Save the Process */
- CsrProcessId = ConnectionInfo.ProcessId;
+ CsrProcessId = ConnectionInfo.ServerProcessId;
/* Save CSR Section data */
NtCurrentPeb()->ReadOnlySharedMemoryBase = ConnectionInfo.SharedSectionBase;
NtCurrentPeb()->ReadOnlySharedMemoryHeap = ConnectionInfo.SharedSectionHeap;
- NtCurrentPeb()->ReadOnlyStaticServerData = ConnectionInfo.SharedSectionData;
+ NtCurrentPeb()->ReadOnlyStaticServerData = ConnectionInfo.SharedStaticServerData;
/* Create the port heap */
CsrPortHeap = RtlCreateHeap(0,
Modified: trunk/reactos/include/reactos/subsys/csr/csrmsg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/csr…
==============================================================================
--- trunk/reactos/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] Thu Aug 29 00:02:15
2013
@@ -46,15 +46,15 @@
typedef struct _CSR_API_CONNECTINFO
{
- ULONG Version;
- ULONG Unknown;
HANDLE ObjectDirectory;
PVOID SharedSectionBase;
+ PVOID SharedStaticServerData;
PVOID SharedSectionHeap;
- PVOID SharedSectionData;
ULONG DebugFlags;
- ULONG Unknown2[3];
- HANDLE ProcessId;
+ ULONG SizeOfPebData;
+ ULONG SizeOfTebData;
+ ULONG NumberOfServerDllNames;
+ HANDLE ServerProcessId;
} CSR_API_CONNECTINFO, *PCSR_API_CONNECTINFO;
#define CSRSRV_VERSION 0x10000
Modified: trunk/reactos/subsystems/win32/csrsrv/api.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrsrv/ap…
==============================================================================
--- trunk/reactos/subsystems/win32/csrsrv/api.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrsrv/api.c [iso-8859-1] Thu Aug 29 00:02:15 2013
@@ -180,7 +180,12 @@
Status = CsrSrvAttachSharedSection(CsrProcess, ConnectInfo);
/* Check how this went */
- if (NT_SUCCESS(Status)) AllowConnection = TRUE;
+ if (NT_SUCCESS(Status))
+ {
+ /* Allow the connection, and return debugging flag */
+ ConnectInfo->DebugFlags = CsrDebug;
+ AllowConnection = TRUE;
+ }
}
/* Dereference the project */
@@ -197,7 +202,7 @@
RemotePortView.ViewBase = NULL;
/* Save the Process ID */
- ConnectInfo->ProcessId = NtCurrentTeb()->ClientId.UniqueProcess;
+ ConnectInfo->ServerProcessId = NtCurrentTeb()->ClientId.UniqueProcess;
/* Accept the Connection */
Status = NtAcceptConnectPort(&ServerPort,
Modified: trunk/reactos/subsystems/win32/csrsrv/server.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrsrv/se…
==============================================================================
--- trunk/reactos/subsystems/win32/csrsrv/server.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrsrv/server.c [iso-8859-1] Thu Aug 29 00:02:15 2013
@@ -469,7 +469,7 @@
/* Write the values in the Connection Info structure */
ConnectInfo->SharedSectionBase = CsrSrvSharedSectionBase;
ConnectInfo->SharedSectionHeap = CsrSrvSharedSectionHeap;
- ConnectInfo->SharedSectionData = CsrSrvSharedStaticServerData;
+ ConnectInfo->SharedStaticServerData = CsrSrvSharedStaticServerData;
/* Return success */
return STATUS_SUCCESS;