mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 04:13:37 +00:00
[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 ! svn path=/branches/ros-csrss/; revision=57743
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
extern HANDLE CsrApiPort;
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
extern HANDLE CsrPortHeap;
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
+11
-1
@@ -331,8 +331,9 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory,
|
||||
PCSR_CLIENT_CONNECT ClientConnect = &ApiMessage.Data.CsrClientConnect;
|
||||
PCSR_CAPTURE_BUFFER CaptureBuffer;
|
||||
|
||||
/* Validate the Connection Info */
|
||||
DPRINT("CsrClientConnectToServer: %lx %p\n", ServerId, ConnectionInfo);
|
||||
|
||||
/* Validate the Connection Info */
|
||||
if (ConnectionInfo && (!ConnectionInfoSize || !*ConnectionInfoSize))
|
||||
{
|
||||
DPRINT1("Connection info given, but no length\n");
|
||||
@@ -428,6 +429,14 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory,
|
||||
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 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory,
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user