Commit Graph

252 Commits

Author SHA1 Message Date
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
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
71bf45a5d7 Ran indent-all script 2017-01-25 00:34:37 +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
d952852629 Enable FontSmoothing per default
FontSmoothing is now enabled per default or if experience selected by lan or broadband.
2016-08-23 12:43:15 +02:00
David Hill
b3eeca3da0 Fix crash due to missing argument 2016-07-21 12:39:56 -04:00
remijouannet
b46639ad3c indent-all.sh 2016-05-24 18:02:22 +02:00
remijouannet
0f0f64a97e fixing indent 2016-05-24 17:55:28 +02:00
remijouannet
3140824be3 -g 70%x90% 2016-05-24 17:47:03 +02:00
Henrik Andersson
2140da0c3f Update copyright year. 2016-03-18 08:08:16 +01:00
Mike English
2ebe07c2b1 Fix typo in usage message
s/remotly/remotely/
2015-10-20 13:51:59 -04:00
Peter Åstrand
f95ae65dcb Update the visible copyright year.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1847 423420c4-83ab-492f-b58f-81f9feb106b5
2015-03-13 08:57:20 +00:00
Henrik Andersson
761cc053e2 Fixes a bug with Windows Server 2012 r2 and smartcard
redirection were the RDPDR channel is shutdown by server.

The RDPDR channel is shutdown by server when responses from
abdonend iorequests are received on a reinitialized RDPDR
channel. This fix adds epochs for RDPDR channel and tags 
iorequest to specific epoch to handle abdonend iorequest.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1836 423420c4-83ab-492f-b58f-81f9feb106b5
2014-09-11 11:54:46 +00:00
Henrik Andersson
4707416314 Make sure we close the connection before redirect.
Complementary fix for commit r1825.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1827 423420c4-83ab-492f-b58f-81f9feb106b5
2014-09-02 10:24:40 +00: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
46a3684c27 Document the new seamless protocol command PERSISTENT
and implement the usage of the new command in rdesktop.

If a seamless command is specified the persistent mode
of the session will be changed to non-persistent.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1822 423420c4-83ab-492f-b58f-81f9feb106b5
2014-07-03 10:42:04 +00:00
Henrik Andersson
d0b0e731d9 Fix compile error introduced in previous commit.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1819 423420c4-83ab-492f-b58f-81f9feb106b5
2014-07-02 08:05:30 +00:00
Henrik Andersson
07008abc10 Make sure to always add RDP5_NO_CURSOR_SHADOW even
when specifying that nothing should be disabled in
performance flags.

This is a workaround for rdesktop not supporting
alpha cursors.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1818 423420c4-83ab-492f-b58f-81f9feb106b5
2014-07-01 06:17:02 +00:00
Henrik Andersson
a87ed59ad4 Updates all constants for TS_INFO_PACKET flags to
much names in specification.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1817 423420c4-83ab-492f-b58f-81f9feb106b5
2014-06-27 13:49:19 +00:00
Henrik Andersson
1c97aa5be1 Fix constant naming and enabled windowskey by default.
Fixes bug #384

Thanks to Alexander Zakharov for pinpointing
the core issue.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1816 423420c4-83ab-492f-b58f-81f9feb106b5
2014-06-27 13:15:24 +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
f545366312 Add no_cursor_shadow to default performance flags.
This fix the cursor issues on Window 2012



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1792 423420c4-83ab-492f-b58f-81f9feb106b5
2014-03-12 06:22:28 +00:00
Henrik Andersson
b8557c42ea Always enable rdpsnd channel and use flags to control use
of streamed audio or not.

This is a fix for driveredirection which requires rdpsnd
channel to work as mentioned in the following post.

http://social.msdn.microsoft.com/Forums/en-US/75024a3d-458f-4ed9-b55d-7852d0113bd7/rdpbcgrpdf-2-minors-problems-with-server-2012
 


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1791 423420c4-83ab-492f-b58f-81f9feb106b5
2014-03-06 11:43:43 +00:00
Henrik Andersson
6e5bb07c9c Clear memory before use. Fixes bug where hash of licensefilename
differs between load and save.

Thanks to Florent Peterschmitt for reporting,testing and patch.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1788 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-19 08:02:07 +00:00
Henrik Andersson
f9cb55471d Initialize g_hostname at declaration.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1784 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-07 07:33:04 +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
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
48f661b1b0 Fix issue with WTS 2003 and a case were a network error
is triggered at a server redirect, preventing connection
to the new server.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1770 423420c4-83ab-492f-b58f-81f9feb106b5
2013-12-04 11:45:37 +00:00
Henrik Andersson
723b636153 Redirect should not take the codepath as a reconnect
which uses its own cookie and another code path.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1769 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 15:13:56 +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
2503dbb9d9 Cleanup and clarify the implementation of TS_UD_CS_CLUSTER.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1762 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 11:10:35 +00:00
Henrik Andersson
e63a44acb1 Completes previous commit r1759, making redirect server string
dynamically allocated when used.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1760 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-26 11:40:45 +00:00
Henrik Andersson
a080b6750e Make use of announce target FQDN in a redirect.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1759 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-26 11:26:49 +00:00
Henrik Andersson
3e0d255bfb Initial cleanup of the redirection implementation.
Renamed redirect cookie to proper redirect load balance info,
also made it dynamically allocated due to its variable length.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1756 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-26 07:56:04 +00:00
Henrik Andersson
697c0f190d Initialize deactivate variable and make sure we check it to
control reconnection logic.

When hitting cancel at the logon dialog, server will send a
deactivate PDU and close the socket the hard way. This behaviour
introduce a problem when using SSL connection were rdesktop
detected a network error and entered reconnection loop.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1748 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-27 08:18:34 +00:00
Henrik Andersson
d74b2d4278 Added 4 new disconnect reasons with corresponding return code.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1742 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-17 14:48:56 +00:00
Peter Åstrand
4bc4e5b473 Correct build warning caused by commit 1732.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1741 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-17 13:32:16 +00:00
Peter Åstrand
a049f3cc81 Removed unused variable.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1740 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-17 13:27:31 +00:00
Henrik Andersson
58363c5351 - Added rd_create_ui() helper function
- Make sure that ui is created if processing demand active PDU
- Make sure we use precached bitmap cache again

This fixes bugs #367 and #368



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1732 423420c4-83ab-492f-b58f-81f9feb106b5
2013-08-14 13:49:45 +00:00
Henrik Andersson
e0cfeaa585 Bitmap cache precaching is broken, tries to create bitmaps without window
which results in a sigsegv.

Workaround for bug #367



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1731 423420c4-83ab-492f-b58f-81f9feb106b5
2013-08-14 13:23:01 +00:00
Henrik Andersson
adbb6cf0fc Run indent-all script.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1721 423420c4-83ab-492f-b58f-81f9feb106b5
2013-06-20 12:57:00 +00:00
Henrik Andersson
e6b10f6bcb Added tcp_ui_run() to prevent ui_select() push data on transport
which corrupts the stream and prevents a SSL reconnect to work.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1720 423420c4-83ab-492f-b58f-81f9feb106b5
2013-06-20 12:51:27 +00:00
Henrik Andersson
cca2aefefe Make sure to reset encryption to initial value.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1715 423420c4-83ab-492f-b58f-81f9feb106b5
2013-06-20 04:01:10 +00:00
Henrik Andersson
cd7a7342cb Silence some error spamming when rdesktop is in reconnect loop.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1713 423420c4-83ab-492f-b58f-81f9feb106b5
2013-06-14 12:54:38 +00:00
Henrik Andersson
2374054495 Do not report each reconnection retry every 4 seconds, just log
that we entered reconnction loop and log errors.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1712 423420c4-83ab-492f-b58f-81f9feb106b5
2013-06-13 12:32:29 +00:00
Henrik Andersson
dfb3f21069 Fix indentation.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1708 423420c4-83ab-492f-b58f-81f9feb106b5
2013-04-12 08:06:01 +00:00
Henrik Andersson
eced6ca821 Reconnect upon network failure, retry as long the autoreconnect
cookie is valid.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1707 423420c4-83ab-492f-b58f-81f9feb106b5
2013-04-12 06:46:07 +00:00
Henrik Andersson
da3dcb8fbe Remove the use of getopt_long() introduced in previous commit.
Replace it with normal getopt() as we had before to prevent breaking
build of rdesktop on other platforms like solaris.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1706 423420c4-83ab-492f-b58f-81f9feb106b5
2013-03-25 15:56:32 +00:00