GUACAMOLE-979: Ensure all FreeRDP settings strings are independent duplicates of their corresponding Guacamole settings.

FreeRDP 2.0.0 will automatically free all settings strings when the
settings structure is freed. As we will also do the same for our own
settings strings, the FreeRDP settings must be kept independent. There
is no guarantee that the FreeRDP settings will be pushed before an error
causes the connection to abort, nor that the FreeRDP settings will not
need to be pushed multiple times due to an automatic reconnect.
This commit is contained in:
Michael Jumper 2020-03-02 15:01:58 -08:00
parent 4b4b11da57
commit 5e1b92cb65

View File

@ -1296,9 +1296,9 @@ void guac_rdp_push_settings(guac_client* client,
rdp_settings->Workarea = TRUE;
rdp_settings->RemoteApplicationMode = 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->RemoteApplicationCmdLine = guac_settings->remote_app_args;
rdp_settings->RemoteApplicationCmdLine = guac_rdp_strdup(guac_settings->remote_app_args);
}
/* Preconnection ID */
@ -1312,7 +1312,7 @@ void guac_rdp_push_settings(guac_client* client,
if (guac_settings->preconnection_blob != NULL) {
rdp_settings->NegotiateSecurityLayer = FALSE;
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 */