From 67607ce916dbf9aba1de7ef33fa6b84f8fe06621 Mon Sep 17 00:00:00 2001 From: David Fort Date: Thu, 2 Mar 2017 00:29:48 +0100 Subject: [PATCH] Take in account and set the LogonNotify flag This flag was not read in the server case and was always sent in the case of a client. --- libfreerdp/core/info.c | 5 ++++- libfreerdp/core/settings.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index f4aa48510..4ae5dcde0 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -432,6 +432,7 @@ BOOL rdp_read_info_packet(rdpRdp* rdp, wStream* s) settings->RemoteApplicationMode = ((flags & INFO_RAIL) ? TRUE : FALSE); settings->RemoteConsoleAudio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE); settings->CompressionEnabled = ((flags & INFO_COMPRESSION) ? TRUE : FALSE); + settings->LogonNotify = ((flags & INFO_LOGONNOTIFY) ? TRUE : FALSE); if (flags & INFO_COMPRESSION) { @@ -628,7 +629,6 @@ void rdp_write_info_packet(rdpRdp* rdp, wStream* s) flags = INFO_MOUSE | INFO_UNICODE | INFO_LOGONERRORS | - INFO_LOGONNOTIFY | INFO_MAXIMIZESHELL | INFO_ENABLEWINDOWSKEY | INFO_DISABLECTRLALTDEL; @@ -660,6 +660,9 @@ void rdp_write_info_packet(rdpRdp* rdp, wStream* s) flags |= ((settings->CompressionLevel << 9) & 0x00001E00); } + if (settings->LogonNotify) + flags |= INFO_LOGONNOTIFY; + if (settings->Domain) { cbDomain = ConvertToUnicode(CP_UTF8, 0, settings->Domain, -1, &domainW, 0) * 2; diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index f3e2652e4..808f331c9 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -334,6 +334,7 @@ rdpSettings* freerdp_settings_new(DWORD flags) settings->EncryptionMethods = ENCRYPTION_METHOD_NONE; settings->EncryptionLevel = ENCRYPTION_LEVEL_NONE; settings->CompressionEnabled = TRUE; + settings->LogonNotify = TRUE; if (settings->ServerMode) settings->CompressionLevel = PACKET_COMPR_TYPE_RDP61;