Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
d2a96e99d5
@ -43,7 +43,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
|
||||
if (bitmap->data != NULL)
|
||||
{
|
||||
data = freerdp_image_convert(bitmap->data, NULL,
|
||||
bitmap->width, bitmap->height, xfi->srcBpp, xfi->bpp, xfi->clrconv);
|
||||
bitmap->width, bitmap->height, bitmap->bpp, xfi->bpp, xfi->clrconv);
|
||||
|
||||
if (bitmap->ephemeral != true)
|
||||
{
|
||||
|
@ -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 */
|
||||
|
@ -427,7 +427,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8*
|
||||
uint32 dwVersion;
|
||||
|
||||
s = stream_new(0);
|
||||
s->p = s->data = server_cert;
|
||||
stream_attach(s, server_cert, length);
|
||||
|
||||
if (length < 1)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ boolean rdp_client_connect(rdpRdp* rdp)
|
||||
|
||||
if ((selectedProtocol & PROTOCOL_TLS) || (selectedProtocol == PROTOCOL_RDP))
|
||||
{
|
||||
if ((settings->username != NULL) && (settings->password != NULL))
|
||||
if ((settings->username != NULL) && ((settings->password != NULL) || (settings->password_cookie->length > 0)))
|
||||
settings->autologon = true;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
@ -164,28 +164,28 @@ int credssp_authenticate(rdpCredssp* credssp)
|
||||
return 0;
|
||||
|
||||
/* NTLMSSP NEGOTIATE MESSAGE */
|
||||
s->p = s->data = negoTokenBuffer;
|
||||
stream_attach(s, negoTokenBuffer, 2048);
|
||||
ntlmssp_send(ntlmssp, s);
|
||||
credssp->negoToken.data = s->data;
|
||||
credssp->negoToken.length = s->p - s->data;
|
||||
credssp->negoToken.data = stream_get_head(s);
|
||||
credssp->negoToken.length = stream_get_length(s);
|
||||
credssp_send(credssp, &credssp->negoToken, NULL, NULL);
|
||||
|
||||
/* NTLMSSP CHALLENGE MESSAGE */
|
||||
if (credssp_recv(credssp, &credssp->negoToken, NULL, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
s->p = s->data = credssp->negoToken.data;
|
||||
stream_attach(s, credssp->negoToken.data, credssp->negoToken.length);
|
||||
ntlmssp_recv(ntlmssp, s);
|
||||
|
||||
freerdp_blob_free(&credssp->negoToken);
|
||||
|
||||
/* NTLMSSP AUTHENTICATE MESSAGE */
|
||||
s->p = s->data = negoTokenBuffer;
|
||||
stream_attach(s, negoTokenBuffer, 2048);
|
||||
ntlmssp_send(ntlmssp, s);
|
||||
|
||||
/* The last NTLMSSP message is sent with the encrypted public key */
|
||||
credssp->negoToken.data = s->data;
|
||||
credssp->negoToken.length = s->p - s->data;
|
||||
credssp->negoToken.data = stream_get_head(s);
|
||||
credssp->negoToken.length = stream_get_length(s);
|
||||
credssp_encrypt_public_key(credssp, &credssp->pubKeyAuth);
|
||||
credssp_send(credssp, &credssp->negoToken, NULL, &credssp->pubKeyAuth);
|
||||
|
||||
|
@ -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->length > 0)
|
||||
{
|
||||
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;
|
||||
@ -532,7 +540,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
|
||||
stream_write_uint16(s, 0);
|
||||
|
||||
if (cbPassword > 0)
|
||||
stream_write(s, password, cbPassword);
|
||||
stream_write(s, password, cbPassword + 2);
|
||||
stream_write_uint16(s, 0);
|
||||
|
||||
if (cbAlternateShell > 0)
|
||||
|
@ -104,8 +104,16 @@ 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);
|
||||
redirection->password_cookie = xnew(rdpBlob);
|
||||
freerdp_blob_alloc(redirection->password_cookie, passwordLength);
|
||||
stream_read(s, redirection->password_cookie->data, 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 +203,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;
|
||||
|
@ -172,7 +172,7 @@ rdpSettings* settings_new(void* instance)
|
||||
settings->server_auto_reconnect_cookie = xnew(ARC_SC_PRIVATE_PACKET);
|
||||
|
||||
settings->client_time_zone = xnew(TIME_ZONE_INFO);
|
||||
|
||||
settings->password_cookie = xnew(rdpBlob);
|
||||
settings->server_random = xnew(rdpBlob);
|
||||
settings->server_certificate = xnew(rdpBlob);
|
||||
|
||||
@ -190,6 +190,8 @@ void settings_free(rdpSettings* settings)
|
||||
xfree(settings->hostname);
|
||||
xfree(settings->username);
|
||||
xfree(settings->password);
|
||||
freerdp_blob_free(settings->password_cookie);
|
||||
xfree(settings->password_cookie);
|
||||
xfree(settings->domain);
|
||||
xfree(settings->shell);
|
||||
xfree(settings->directory);
|
||||
|
@ -552,6 +552,8 @@ rdpUpdate* update_new(rdpRdp* rdp)
|
||||
deleteList->sIndices = 64;
|
||||
deleteList->indices = xmalloc(deleteList->sIndices * 2);
|
||||
deleteList->cIndices = 0;
|
||||
|
||||
update->SuppressOutput = update_send_suppress_output;
|
||||
}
|
||||
|
||||
return update;
|
||||
|
Loading…
x
Reference in New Issue
Block a user