Merge pull request #3797 from hardening/clientCapabilities

Misc patches around capabilities
This commit is contained in:
Martin Fleisz 2017-02-22 12:53:51 +01:00 committed by GitHub
commit f4efbd9a2c
3 changed files with 186 additions and 234 deletions

View File

@ -48,6 +48,7 @@ typedef BOOL (*psPeerPostConnect)(freerdp_peer* peer);
typedef BOOL (*psPeerActivate)(freerdp_peer* peer);
typedef BOOL (*psPeerLogon)(freerdp_peer* peer, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic);
typedef BOOL (*psPeerAdjustMonitorsLayout)(freerdp_peer* peer);
typedef BOOL (*psPeerClientCapabilities)(freerdp_peer* peer);
typedef int (*psPeerSendChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size);
typedef int (*psPeerReceiveChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size,
@ -116,6 +117,7 @@ struct rdp_freerdp_peer
psPeerHasMoreToRead HasMoreToRead;
psPeerGetEventHandles GetEventHandles;
psPeerAdjustMonitorsLayout AdjustMonitorsLayout;
psPeerClientCapabilities ClientCapabilities;
};
#ifdef __cplusplus

File diff suppressed because it is too large Load Diff

View File

@ -1145,12 +1145,17 @@ BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, wStream* s)
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s)
{
freerdp_peer *peer = rdp->context->peer;
if (rdp->state != CONNECTION_STATE_CAPABILITIES_EXCHANGE)
return FALSE;
if (!rdp_recv_confirm_active(rdp, s))
return FALSE;
if (peer->ClientCapabilities && !peer->ClientCapabilities(peer))
return FALSE;
if (rdp->settings->SaltedChecksum)
rdp->do_secure_checksum = TRUE;