GUACAMOLE-1076: Ensure Client Information PDU is sent during RAIL handshake (required by spec).

This commit is contained in:
Michael Jumper 2020-06-20 14:30:39 -07:00
parent 6a50d3076c
commit a7732e72be

View File

@ -49,13 +49,15 @@
/**
* Completes initialization of the RemoteApp session, responding to the server
* handshake, sending client system parameters, and executing the desired
* RemoteApp command. This is accomplished using the Handshake PDU, Client
* System Parameters Update PDU, and Client Execute PDU respectively. These
* PDUs MUST be sent for the desired RemoteApp to run, and MUST NOT be sent
* until after a Handshake or HandshakeEx PDU has been received. See:
* handshake, sending client status and system parameters, and executing the
* desired RemoteApp command. This is accomplished using the Handshake PDU,
* Client Information PDU, one or more Client System Parameters Update PDUs,
* and the Client Execute PDU respectively. These PDUs MUST be sent for the
* desired RemoteApp to run, and MUST NOT be sent until after a Handshake or
* HandshakeEx PDU has been received. See:
*
* https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/cec4eb83-b304-43c9-8378-b5b8f5e7082a (Handshake PDU)
* https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/743e782d-f59b-40b5-a0f3-adc74e68a2ff (Client Information PDU)
* https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/60344497-883f-4711-8b9a-828d1c580195 (System Parameters Update PDU)
* https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/98a6e3c3-c2a9-42cc-ad91-0d9a6c211138 (Client Execute PDU)
*
@ -88,6 +90,15 @@ static UINT guac_rdp_rail_complete_handshake(RailClientContext* rail) {
if (status != CHANNEL_RC_OK)
return status;
RAIL_CLIENT_STATUS_ORDER client_status = {
.flags = 0x00
};
/* Send client status */
status = rail->ClientInformation(rail, &client_status);
if (status != CHANNEL_RC_OK)
return status;
RAIL_SYSPARAM_ORDER sysparam = {
.workArea = {
.left = 0,