diff options
| author | speidy <speidy@gmail.com> | 2013-10-09 23:00:05 +0300 |
|---|---|---|
| committer | speidy <speidy@gmail.com> | 2013-10-09 23:00:05 +0300 |
| commit | c2e7da84d416000a0b08ee561498044196437462 (patch) | |
| tree | 04929dcc5c0eee154a123337ca66deb4b98d9279 /libxrdp/xrdp_sec.c | |
| parent | a8ab4cb5d1fa5d297b33e5802bf261707482f31e (diff) | |
| download | xrdp-proprietary-c2e7da84d416000a0b08ee561498044196437462.tar.gz xrdp-proprietary-c2e7da84d416000a0b08ee561498044196437462.zip | |
libxrdp: add clientRequestedProtocol only when RDPNEGDATA occurs.
Diffstat (limited to 'libxrdp/xrdp_sec.c')
| -rw-r--r-- | libxrdp/xrdp_sec.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 85b332ba..3d06c0f3 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -986,14 +986,28 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) out_uint8(s, 0x63); /* c */ out_uint8(s, 0x44); /* D */ out_uint8(s, 0x6e); /* n */ - out_uint16_be(s, 0x80fc + (num_channels_even * 2) + 4); + if (self->mcs_layer->iso_layer->selectedProtocol != -1) { // Check for RDPNEGDATA availability + out_uint16_be(s, 0x80fc + (num_channels_even * 2) + 4); + } + else + { + out_uint16_be(s, 0x80fc + (num_channels_even * 2)); + } out_uint16_le(s, SEC_TAG_SRV_INFO); - out_uint16_le(s, 12); /* len */ + if (self->mcs_layer->iso_layer->selectedProtocol != -1) { + out_uint16_le(s, 12); /* len */ + } + else + { + out_uint16_le(s, 8); /* len */ + } out_uint8(s, 4); /* 4 = rdp5 1 = rdp4 */ out_uint8(s, 0); out_uint8(s, 8); out_uint8(s, 0); - out_uint32_le(s, PROTOCOL_RDP); /* clientReqeustedProtocol */ //TODO: pass it through sec_layer->selectedProtocol + if (self->mcs_layer->iso_layer->selectedProtocol != -1) { + out_uint32_le(s, self->mcs_layer->iso_layer->selectedProtocol); /* clientReqeustedProtocol */ + } out_uint16_le(s, SEC_TAG_SRV_CHANNELS); out_uint16_le(s, 8 + (num_channels_even * 2)); /* len */ out_uint16_le(s, MCS_GLOBAL_CHANNEL); /* 1003, 0x03eb main channel */ |
