From 815c97efb259067e1069ef15b424505d8f4b93a4 Mon Sep 17 00:00:00 2001 From: David Fort Date: Thu, 2 Mar 2017 00:39:08 +0100 Subject: [PATCH] The LongCredentials capability were not parsed or used --- libfreerdp/core/capabilities.c | 13 ++++++++----- libfreerdp/core/settings.c | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 55ad6dbb1..b7179929b 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -193,10 +193,10 @@ static BOOL rdp_read_general_capability_set(wStream* s, UINT16 length, Stream_Seek_UINT16(s); /* remoteUnshareFlag (2 bytes) */ Stream_Seek_UINT16(s); /* generalCompressionLevel (2 bytes) */ Stream_Read_UINT8(s, refreshRectSupport); /* refreshRectSupport (1 byte) */ - Stream_Read_UINT8(s, - suppressOutputSupport); /* suppressOutputSupport (1 byte) */ - settings->NoBitmapCompressionHeader = (extraFlags & NO_BITMAP_COMPRESSION_HDR) ? - TRUE : FALSE; + Stream_Read_UINT8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */ + + settings->NoBitmapCompressionHeader = (extraFlags & NO_BITMAP_COMPRESSION_HDR) ? TRUE : FALSE; + settings->LongCredentialsSupported = (extraFlags & LONG_CREDENTIALS_SUPPORTED) ? TRUE : FALSE; if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED)) settings->FastPathOutput = FALSE; @@ -237,7 +237,10 @@ static BOOL rdp_write_general_capability_set(wStream* s, rdpSettings* settings) return FALSE; header = rdp_capability_set_start(s); - extraFlags = LONG_CREDENTIALS_SUPPORTED; + extraFlags = 0; + + if (settings->LongCredentialsSupported) + extraFlags |= LONG_CREDENTIALS_SUPPORTED; if (settings->NoBitmapCompressionHeader) extraFlags |= NO_BITMAP_COMPRESSION_HDR; diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 808f331c9..8c5e76873 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -506,6 +506,7 @@ rdpSettings* freerdp_settings_new(DWORD flags) settings->GatewayUdpTransport = TRUE; settings->FastPathInput = TRUE; settings->FastPathOutput = TRUE; + settings->LongCredentialsSupported = TRUE; settings->FrameAcknowledge = 2; settings->MouseMotion = TRUE; settings->NSCodecColorLossLevel = 3;