Use redirect cookie instead of password if available.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1768 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
a2492ab3b0
commit
a090d06331
17
rdp.c
17
rdp.c
@ -379,6 +379,12 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
|
||||
|
||||
DEBUG_RDP5(("Sending RDP5-style Logon packet\n"));
|
||||
|
||||
if (g_redirect_cookie_len > 0)
|
||||
{
|
||||
len_password = g_redirect_cookie_len;
|
||||
len_password -= 2; /* substract 2 bytes which is added below */
|
||||
}
|
||||
|
||||
packetlen =
|
||||
/* size of TS_INFO_PACKET */
|
||||
4 + /* CodePage */
|
||||
@ -437,7 +443,16 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
|
||||
out_uint16_le(s, 0); /* mandatory 2 bytes null terminator */
|
||||
|
||||
if (0 < len_password)
|
||||
rdp_out_unistr(s, password, len_password);
|
||||
{
|
||||
if (0 < g_redirect_cookie_len)
|
||||
{
|
||||
out_uint8p(s, g_redirect_cookie, g_redirect_cookie_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
rdp_out_unistr(s, password, len_password);
|
||||
}
|
||||
}
|
||||
else
|
||||
out_uint16_le(s, 0); /* mandatory 2 bytes null terminator */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user