Merge pull request #298 from atong-tcs/master

server redirection
This commit is contained in:
Marc-André Moreau 2011-12-21 12:14:37 -08:00
commit dcd1cff4c2
2 changed files with 17 additions and 1 deletions

View File

@ -169,6 +169,12 @@ boolean rdp_client_redirect(rdpRdp* rdp)
settings->domain = redirection->domain.ascii;
}
if (redirection->flags & LB_PASSWORD)
{
xfree(settings->password);
settings->password = redirection->password.ascii;
}
return rdp_client_connect(rdp);
}

View File

@ -637,7 +637,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
printf("Error: TODO\n");
return false;
}
if (securityHeader & SEC_ENCRYPT)
if (securityHeader & (SEC_ENCRYPT|SEC_REDIRECTION_PKT))
{
if (!rdp_decrypt(rdp, s, length - 4))
{
@ -645,6 +645,16 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
return false;
}
}
if (securityHeader & SEC_REDIRECTION_PKT)
{
/*
* [MS-RDPBCGR] 2.2.13.2.1
* - no share control header, nor the 2 byte pad
*/
s->p -= 2;
rdp_recv_enhanced_security_redirection_packet(rdp, s);
return true;
}
}
if (channelId != MCS_GLOBAL_CHANNEL_ID)