Author: hbelusca Date: Tue Nov 20 22:48:11 2012 New Revision: 57743
URL: http://svn.reactos.org/svn/reactos?rev=57743&view=rev Log: [NTDLL] When calling CsrClientConnectToServer with a valid connection info user buffer, after capturing the buffer and calling CsrClientCallServer, do not forget to copy back to the user buffer the updated connection info and to free the capture buffer !
Modified: branches/ros-csrss/dll/ntdll/csr/api.c branches/ros-csrss/dll/ntdll/csr/capture.c branches/ros-csrss/dll/ntdll/csr/connect.c
Modified: branches/ros-csrss/dll/ntdll/csr/api.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/api.c?re... ============================================================================== --- branches/ros-csrss/dll/ntdll/csr/api.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/ntdll/csr/api.c [iso-8859-1] Tue Nov 20 22:48:11 2012 @@ -13,6 +13,7 @@ #include <debug.h>
/* GLOBALS ********************************************************************/ + extern HANDLE CsrApiPort;
/* FUNCTIONS ******************************************************************/
Modified: branches/ros-csrss/dll/ntdll/csr/capture.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/capture.... ============================================================================== --- branches/ros-csrss/dll/ntdll/csr/capture.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/ntdll/csr/capture.c [iso-8859-1] Tue Nov 20 22:48:11 2012 @@ -13,6 +13,7 @@ #include <debug.h>
/* GLOBALS ********************************************************************/ + extern HANDLE CsrPortHeap;
/* FUNCTIONS ******************************************************************/
Modified: branches/ros-csrss/dll/ntdll/csr/connect.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/csr/connect.... ============================================================================== --- branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] (original) +++ branches/ros-csrss/dll/ntdll/csr/connect.c [iso-8859-1] Tue Nov 20 22:48:11 2012 @@ -331,8 +331,9 @@ PCSR_CLIENT_CONNECT ClientConnect = &ApiMessage.Data.CsrClientConnect; PCSR_CAPTURE_BUFFER CaptureBuffer;
+ DPRINT("CsrClientConnectToServer: %lx %p\n", ServerId, ConnectionInfo); + /* Validate the Connection Info */ - DPRINT("CsrClientConnectToServer: %lx %p\n", ServerId, ConnectionInfo); if (ConnectionInfo && (!ConnectionInfoSize || !*ConnectionInfoSize)) { DPRINT1("Connection info given, but no length\n"); @@ -428,6 +429,14 @@ CaptureBuffer, CSR_CREATE_API_NUMBER(CSRSRV_SERVERDLL_INDEX, CsrpClientConnect), sizeof(CSR_CLIENT_CONNECT)); + + /* Copy the updated connection info data back into the user buffer */ + RtlMoveMemory(ConnectionInfo, + ClientConnect->ConnectionInfo, + *ConnectionInfoSize); + + /* Free the capture buffer */ + CsrFreeCaptureBuffer(CaptureBuffer); } else { @@ -438,6 +447,7 @@ /* Let the caller know if this was server to server */ DPRINT("Status was: 0x%lx. Are we in server: 0x%x\n", Status, InsideCsrProcess); if (ServerToServerCall) *ServerToServerCall = InsideCsrProcess; + return Status; }