First attempt at fixing the password issue; this segfaults unfortunately.
This commit is contained in:
parent
faae95185f
commit
4aeb52aace
@ -269,7 +269,8 @@ struct rdp_settings
|
||||
boolean autologon; /* 58 */
|
||||
boolean compression; /* 59 */
|
||||
uint32 performance_flags; /* 60 */
|
||||
uint32 paddingC[80 - 61]; /* 61 */
|
||||
rdpBlob* password_cookie; /* 61 */
|
||||
uint32 paddingC[80 - 62]; /* 62 */
|
||||
|
||||
/* User Interface Parameters */
|
||||
boolean sw_gdi; /* 80 */
|
||||
|
@ -177,8 +177,8 @@ boolean rdp_client_redirect(rdpRdp* rdp)
|
||||
|
||||
if (redirection->flags & LB_PASSWORD)
|
||||
{
|
||||
xfree(settings->password);
|
||||
settings->password = redirection->password.ascii;
|
||||
freerdp_blob_free(&settings->password_cookie);
|
||||
settings->password_cookie = redirection->password_cookie;
|
||||
}
|
||||
|
||||
return rdp_client_connect(rdp);
|
||||
|
@ -505,8 +505,16 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
|
||||
userName = (uint8*)freerdp_uniconv_out(settings->uniconv, settings->username, &length);
|
||||
cbUserName = length;
|
||||
|
||||
password = (uint8*)freerdp_uniconv_out(settings->uniconv, settings->password, &length);
|
||||
cbPassword = length;
|
||||
if (settings->password_cookie != NULL)
|
||||
{
|
||||
password = (uint8*)settings->password_cookie->data;
|
||||
cbPassword = settings->password_cookie->length - 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
password = (uint8*)freerdp_uniconv_out(settings->uniconv, settings->password, &length);
|
||||
cbPassword = length;
|
||||
}
|
||||
|
||||
alternateShell = (uint8*)freerdp_uniconv_out(settings->uniconv, settings->shell, &length);
|
||||
cbAlternateShell = length;
|
||||
|
@ -104,8 +104,13 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
if (redirection->flags & LB_PASSWORD)
|
||||
{
|
||||
freerdp_string_read_length32(s, &redirection->password, rdp->settings->uniconv);
|
||||
DEBUG_REDIR("password: %s", redirection->password.ascii);
|
||||
uint32 passwordLength;
|
||||
stream_read_uint32(s, passwordLength);
|
||||
freerdp_blob_alloc(redirection->password_cookie, passwordLength);
|
||||
#ifdef WITH_DEBUG_REDIR
|
||||
DEBUG_REDIR("password_cookie:");
|
||||
freerdp_hexdump(redirection->password_cookie.data, redirection->password_cookie.length);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (redirection->flags & LB_TARGET_FQDN)
|
||||
@ -195,7 +200,7 @@ void redirection_free(rdpRedirection* redirection)
|
||||
freerdp_string_free(&redirection->tsvUrl);
|
||||
freerdp_string_free(&redirection->username);
|
||||
freerdp_string_free(&redirection->domain);
|
||||
freerdp_string_free(&redirection->password);
|
||||
freerdp_blob_free(&redirection->password_cookie);
|
||||
freerdp_string_free(&redirection->targetFQDN);
|
||||
freerdp_string_free(&redirection->targetNetBiosName);
|
||||
freerdp_string_free(&redirection->targetNetAddress);
|
||||
|
@ -50,7 +50,7 @@ struct rdp_redirection
|
||||
rdpString tsvUrl;
|
||||
rdpString username;
|
||||
rdpString domain;
|
||||
rdpString password;
|
||||
rdpBlob* password_cookie;
|
||||
rdpString targetFQDN;
|
||||
rdpBlob loadBalanceInfo;
|
||||
rdpString targetNetBiosName;
|
||||
|
Loading…
Reference in New Issue
Block a user