Commit Graph

187 Commits

Author SHA1 Message Date
Karl Mikaelsson
ca5c0adefd Rename rdp_send_logon_info to rdp_send_client_info_pdu 2018-01-25 16:47:17 +01:00
Cendio
7f76e2218a Rename of global variable for clarity
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
ab50ea31cf Implement dynamic session resize
This adds support for resizing the RDP session dynamically based on
the window size. Some complicated logic has been added to avoid
sending excessive amounts of resize requests to the RDP server.

When supported, this resize mechanism should use the RDPEDISP way of
signalling the server to initiate a Deactivate/Activate sequence, but
rdesktop will fall back on Disconnect/Reconnect if RDPEDISP is not
supported by the server.

ui_select has been refactored and most functionality has been broken
out into three new functions, simplifying ui_select into a loop.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 11:15:03 +01:00
Cendio
d037db1086 Increase default desktop size and enable wallpaper 2017-11-09 17:15:16 +01:00
Henrik Andersson
d3d6613c78 Fix compiler warning 2017-11-03 12:49:11 +01:00
René Genz
9e99dd52d6 Fix minor spelling mistakes 2017-11-02 01:01:44 +01:00
Joshua Hudson
e7cda3dbf8 add -M for local mouse cursor 2017-11-01 06:47:31 +01:00
Henrik Andersson
5aa5a9dbfc Minor refactor of process_logon_pdu() 2017-11-01 06:47:31 +01:00
Karl Mikaelsson
8f83c1f6c7 Rename suppress output functions to match MS-RDPBCGR
Issue #161
2017-10-30 10:47:21 +01:00
Karl Mikaelsson
99f5925cce Enable support for large pointers
The cursor-handling code already handles larger pointer sizes. This
advertises that rdesktop has the capability to handle large cursors
and adjusts the maximum size of fragmented packets to suit the large
cursor requirements.

Solves issue #173.
2017-10-16 19:26:30 +02:00
Henrik Andersson
032d67f6ac Remove global variable g_bitmap_compression
g_bitmap_compression is a global variable scattered through the code
but only accessed and used in one place; rdp_out_bitmap_caps().
Demoted it to localvariable and replaced with hardcoded value.
2017-10-16 15:34:47 +02:00
Karl Mikaelsson
0c7b4117ab Enable fragmented Fast-Path Updates
Fragmented updates are concatenated into temporary streams (one per
update type) that are processed when receiving an update with the
FASTPATH_FRAGMENT_LAST bit set.
2017-10-16 14:01:13 +02:00
Karl Mikaelsson
b8a1d04ffb Use system default pointer when requested
Solves problem with hidden cursors at login screen (part of
issue #165)

Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Henrik Andersson <hean01@cendio.se>
2017-10-16 13:55:39 +02:00
Karl Mikaelsson
12ee9eb035 Avoid magic constants in caplen too 2017-10-13 14:34:01 +02:00
Karl Mikaelsson
eec94365c4 Improve Fast-Path code readability
Using constants and field definitions from MS-RDPBCGR.
2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3abeca252b Log system pointer changes via Fast-Path updates 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
72f63d04ec Decipher remaining capabilitysets sent from rdesktop 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
9ca206bc08 Clarify order and bitmap capability set functions 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3b0a0c1334 Improve rdp_out_general_caps
Rename to rdp_out_ts_general_capabilityset to match the structure
name, describe all fields and use constants instead of magic numbers.
2017-10-13 14:02:03 +02:00
Henrik Andersson
594438e5eb Make deprecated rdp_out_unistr() static 2017-09-29 16:30:17 +02:00
Henrik Andersson
de8fe9429f Add two new stream functions for writing utf16 strings
This is the first steps of removing the old rdp_out_unistr() and
using clearer code.
2017-09-29 14:24:27 +02:00
Henrik Andersson
b872ddb21d Ran indent script 2017-06-07 09:39:29 +02:00
Henrik Andersson
b9481bb01b Fix reconnection using the cookie
The use of redirection cookie was never done due to global
g_redirect flag was cleared on the wrong place. This fixes
the problem with dual authentication prompts when redirect
to another server upon connect.

Fixes issue #18
2017-05-15 08:36:41 +02:00
Henrik Andersson
708b0f0071 Rename redirection flags matching names in specification
Also added missing flags available from spec
2017-05-15 08:03:39 +02:00
Henrik Andersson
c93960b266 Cleanup of TS_SECURITY_HEADER code
Add correct naming of header TS_SECURITY_HEADER and its flags
as per MSRDPBCGR specification.
2017-03-07 15:32:14 +01:00
Henrik Andersson
87d8d123b8 Rework the logging system
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.

- Same logging api  for all kind of logging and messages to
   end user.

- Adding -v for verbose output when running rdesktop.

- All messages are logged into a subject and with a type, eg:

     logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);

- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
  which specifies subjects of interest, comma separated. There is a special
  subject named All which includes all subject for debug loggin. There is also
  a simple logic opeartor '!' = NOT which can be used in combination like:

    RDESKTOP_DEBUG=All,!Graphics,!Sound

  Which would give debug log output for All subject except Graphics and Sound.
2017-01-26 14:19:40 +01:00
Henrik Andersson
79b9813df5 Minor refactor of rdp_out_unistr()
The logon packets wants a mandatory null termination
to be written to stream if not string is available.
The current design was to do if statements at those
points to handle this. Refactored that code into
function rdp_out_unistr_mandatory_null() for a
cleaner code when building up the packets.
2017-01-20 10:32:46 +01:00
Henrik Andersson
2ea3f69873 Raise requirment for iconv to required
This commit changes rdesktop project to require iconv().

Part of issue #89
2017-01-20 08:46:27 +01:00
Henrik Andersson
c7369052cc Regression in RDP_V4 logon packet introduced by commit 78a4f41.
Commit 78a4f41, forces the caller to handle the write of empty string byte
where protocol needs it. This commit fixes the RDP V4 logon packet which needs
a mandatory 2 bytes null terminator to be written if strings are empty.

Fixes issue #67
2016-10-14 13:27:09 +02:00
Henrik Andersson
e62ad7cee9 Fix crash in rdp_in_unistr() issue #25 2016-06-16 16:06:36 +02:00
Henrik Andersson
ee8366405d Make sure we handle redirection PDU packet received
within rdp_connect() loop.

Fixes silent exits of rdesktop when receiving a redirection
PDU before license handling which is a corner case appeared
while using CredSSP+Kerberos.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1825 423420c4-83ab-492f-b58f-81f9feb106b5
2014-08-27 12:19:59 +00:00
Henrik Andersson
78a4f41f48 Fix sigsegv while using credssp and kerberos without
specifying domainname as argument.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1824 423420c4-83ab-492f-b58f-81f9feb106b5
2014-08-27 12:15:21 +00:00
Henrik Andersson
d70b65edc7 Revert of commit 1794.
Fixes regression with "disconnect: Invalid licensing message."



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1823 423420c4-83ab-492f-b58f-81f9feb106b5
2014-08-18 07:47:07 +00:00
Henrik Andersson
d3c4cb3535 Run indentation script.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1805 423420c4-83ab-492f-b58f-81f9feb106b5
2014-05-20 14:34:45 +00:00
Henrik Andersson
a563c49723 Use correct types for reading cursot hotspot and
clamp the point into cursor boundingbox.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1799 423420c4-83ab-492f-b58f-81f9feb106b5
2014-05-20 06:27:09 +00:00
Henrik Andersson
a1f8856484 Make password variable global and clear it in correct place.
This fix a bug where redirection using CredSSP fails to SSO
due to wrong password sent to server and asks for a correct one.
The source to this issue was that the password was zeroed before
the actual redirection is handled.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1795 423420c4-83ab-492f-b58f-81f9feb106b5
2014-04-24 12:02:40 +00:00
Henrik Andersson
708c3861f1 Remove process of packets in rdp_connect.
The process of packets in rdp_connect assumes that the
first packets are demand active to set g_rdp_shareid which
is not true. In case when CredSSP+Kerberos is in use an
enhanced redirection PDU packet is sent before the demande
active PDU.

This fixes the problem with rdesktop silently exists in
the case above.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1794 423420c4-83ab-492f-b58f-81f9feb106b5
2014-04-23 06:11:55 +00:00
Henrik Andersson
38ca609c78 Added minimal implementation for TS_AUTORECONNECT_STATUS_PDU.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1789 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-19 08:57:51 +00:00
Henrik Andersson
f28bddc81b Fix bug with broken auto reconnect packet, introduced
in commit 1766.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1786 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-07 13:10:45 +00:00
Henrik Andersson
7ece007132 Fix indentation...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1778 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-12 14:01:58 +00:00
Henrik Andersson
c618390bbe Break out of rdp main loop if server sent a redirect PDU.
This is needed on 2012r2 were server will not disconnect
a rdp connection after a redirect packet.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1777 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-10 11:16:56 +00:00
Henrik Andersson
f0b6604347 Changed rdp_in_unistr() to make dynamic allocation of converted string
instead of using hardcoded buffer sizes and assumtion that conversion
just fits the size.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1773 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-06 12:43:08 +00:00
Henrik Andersson
6de37a4f3b Dynamic allocation of redirect username.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1772 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-06 07:54:51 +00:00
Henrik Andersson
8c5d480bf3 Use g_redirect flag when creating a logon packet and clear
the flag when finished.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1771 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-04 11:52:33 +00:00
Henrik Andersson
a090d06331 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
2013-11-28 15:13:04 +00:00
Henrik Andersson
a2492ab3b0 Missed to run indent-all script of previous script.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1767 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 14:47:29 +00:00
Henrik Andersson
030333d7e1 Cleanup and clarify of TS_INFO_PAKCKET.
- Removed unused LOGON_BLOB code
- Removed AUTOLOGON, if password is null no logon will be
  performed anyway.
- Comments of fields written to packet
- Clarified string handling difference between TS_INFO_PACKET
  and TS_EXTENDED_INFO_PACKET



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1766 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 14:46:14 +00:00
Henrik Andersson
820a2f7bb8 Server redirect password should be interpreted as a binary blob
and not a unicode string, which is passed though as a password
during the redirection.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1765 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 11:59:05 +00:00
Henrik Andersson
a1db8d906c Fix issue while parsing the redirect packet to match the spec.
However there is a change in the length compared to current
implementation which has provenly been working, so lets handle it
with a flag for now.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1764 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 11:33:50 +00:00
Henrik Andersson
092f895a20 Revert an issue introduced by commit r1757 due to
unclear specs. The data is processed in lower layers
in the protocol stack.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1763 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 11:18:11 +00:00