Merge staging/1.2.0 changes back to master.

This commit is contained in:
Nick Couchman 2020-03-02 18:38:03 -05:00
commit f47491eaca
2 changed files with 27 additions and 9 deletions

View File

@ -48,12 +48,14 @@
#endif #endif
/** /**
* Completes initialization of the RemoteApp session, sending client system * Completes initialization of the RemoteApp session, responding to the server
* parameters and executing the desired RemoteApp command using the Client * handshake, sending client system parameters, and executing the desired
* System Parameters Update PDU and Client Execute PDU respectively. These PDUs * RemoteApp command. This is accomplished using the Handshake PDU, Client
* MUST be sent for the desired RemoteApp to run, and MUST NOT be sent until * System Parameters Update PDU, and Client Execute PDU respectively. These
* after a Handshake or HandshakeEx PDU has been received. See: * 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/60344497-883f-4711-8b9a-828d1c580195 (System Parameters Update 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) * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/98a6e3c3-c2a9-42cc-ad91-0d9a6c211138 (Client Execute PDU)
* *
@ -67,9 +69,25 @@
*/ */
static UINT guac_rdp_rail_complete_handshake(RailClientContext* rail) { static UINT guac_rdp_rail_complete_handshake(RailClientContext* rail) {
UINT status;
guac_client* client = (guac_client*) rail->custom; guac_client* client = (guac_client*) rail->custom;
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data; guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
RAIL_HANDSHAKE_ORDER handshake = {
/* Build number 7600 (0x1DB0) apparently represents Windows 7 and
* compatibility with RDP 7.0. As of this writing, this is the same
* build number sent for RAIL connections by xfreerdp. */
.buildNumber = 7600
};
/* Send client handshake response */
status = rail->ClientHandshake(rail, &handshake);
if (status != CHANNEL_RC_OK)
return status;
RAIL_SYSPARAM_ORDER sysparam = { RAIL_SYSPARAM_ORDER sysparam = {
.workArea = { .workArea = {
.left = 0, .left = 0,
@ -81,7 +99,7 @@ static UINT guac_rdp_rail_complete_handshake(RailClientContext* rail) {
}; };
/* Send client system parameters */ /* Send client system parameters */
UINT status = rail->ClientSystemParam(rail, &sysparam); status = rail->ClientSystemParam(rail, &sysparam);
if (status != CHANNEL_RC_OK) if (status != CHANNEL_RC_OK)
return status; return status;

View File

@ -1296,9 +1296,9 @@ void guac_rdp_push_settings(guac_client* client,
rdp_settings->Workarea = TRUE; rdp_settings->Workarea = TRUE;
rdp_settings->RemoteApplicationMode = TRUE; rdp_settings->RemoteApplicationMode = TRUE;
rdp_settings->RemoteAppLanguageBarSupported = TRUE; rdp_settings->RemoteAppLanguageBarSupported = TRUE;
rdp_settings->RemoteApplicationProgram = guac_settings->remote_app; rdp_settings->RemoteApplicationProgram = guac_rdp_strdup(guac_settings->remote_app);
rdp_settings->ShellWorkingDirectory = guac_rdp_strdup(guac_settings->remote_app_dir); rdp_settings->ShellWorkingDirectory = guac_rdp_strdup(guac_settings->remote_app_dir);
rdp_settings->RemoteApplicationCmdLine = guac_settings->remote_app_args; rdp_settings->RemoteApplicationCmdLine = guac_rdp_strdup(guac_settings->remote_app_args);
} }
/* Preconnection ID */ /* Preconnection ID */
@ -1312,7 +1312,7 @@ void guac_rdp_push_settings(guac_client* client,
if (guac_settings->preconnection_blob != NULL) { if (guac_settings->preconnection_blob != NULL) {
rdp_settings->NegotiateSecurityLayer = FALSE; rdp_settings->NegotiateSecurityLayer = FALSE;
rdp_settings->SendPreconnectionPdu = TRUE; rdp_settings->SendPreconnectionPdu = TRUE;
rdp_settings->PreconnectionBlob = guac_settings->preconnection_blob; rdp_settings->PreconnectionBlob = guac_rdp_strdup(guac_settings->preconnection_blob);
} }
/* Enable use of RD gateway if a gateway hostname is provided */ /* Enable use of RD gateway if a gateway hostname is provided */