Commit Graph

50 Commits

Author SHA1 Message Date
dbac3db7b7 Fourth Batch: Update files using ChatGPT 4o 2024-05-31 16:42:49 +02:00
Pierre Ossman
c6d8b933c8 Avoid preallocated streams in tcp.c
We don't know when the caller might be done with a stream, so we
can end up with code overwriting things in a stream that is in use
elsewhere.

Solve the issue by returning a new stream each time and leave it
up to the callers to free it.
2019-05-06 14:33:05 +02:00
Pierre Ossman
75221eb3c5 Separate behaviour of out_uint8a and out_uint8p
Make them more match in_uint8a and in_uint8p in that one copies and
the other just gives you a pointer and it is up to the caller how
to fill it in. This can be useful when other APIs are used to
generate the data as it avoids a temporary buffer.
2019-05-06 14:33:05 +02:00
Pierre Ossman
6268b44f06 Add macro to check remaining length of STREAM
Avoids poking around in the internals, and also makes the code
easier to read.
2019-05-06 14:33:05 +02:00
Henrik Andersson
c16b74a974 Run indent-all.sh script on source 2018-10-29 15:53:57 +01:00
gpatel-fr
5ef8706e13 more helpful error message for TLS version problems 2018-10-22 21:02:23 +02:00
Henrik Andersson
b5708cf775 Refactoring of slow and fastpath handling
This changes clarifies a chunk of code related to receiving
data and handle slow and fast path pdus.
2018-02-01 12:47:22 +01:00
René Genz
9e99dd52d6 Fix minor spelling mistakes 2017-11-02 01:01:44 +01:00
Henrik Andersson
896a923f55 Markup unused parameters 2017-10-20 11:05:52 +02:00
Henrik Andersson
fd1673392e Fix unused-but-set-variable compiler warnings 2017-10-17 10:50:14 +02:00
Karl Mikaelsson
63ac9d3c42 Clarify the Fast-Path handling in the T.123/X.224 layer 2017-10-13 14:02:03 +02:00
Henrik Andersson
af36ac3a64 Add log of reason for protocol negotiation failure
Fixes issue #104
2017-03-03 09:29:53 +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
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
6364680a8c Don't send incomplete connection request packet on reconnect.
Fixes connection error when reconnecting after a network error
or pending_resize disconnection..



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1787 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-07 14:08:00 +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
d18def31e3 Reconnect with plain RDP if server cert is not configured.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1710 423420c4-83ab-492f-b58f-81f9feb106b5
2013-04-18 07:11:45 +00:00
Henrik Andersson
d1e8fdc90a Initial support for CredSSP smartcard authentication.
- Add implementation of TSSmartCardCreds and TSCSPDataDetail for
  CredSSP protocol.
- Add handling of long opts for getopt()
- Added 4 new long opts for providing information to CredSSP which
  is required for smartcard credentials.
- Updated manual with information about the new arguments.

If smartcard authentication is request by commandline "-i" option,
and no CredSSP smartcard options is provided, rdesktop will
negotiate to use SSL and warn.




git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1705 423420c4-83ab-492f-b58f-81f9feb106b5
2013-03-25 13:01:38 +00:00
Henrik Andersson
5627a47115 Add missing newline for warning message.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1698 423420c4-83ab-492f-b58f-81f9feb106b5
2013-03-18 12:04:38 +00:00
Henrik Andersson
d584b2fa3f Make sure that CredSSP is not used for smartcard SSO.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1697 423420c4-83ab-492f-b58f-81f9feb106b5
2013-03-18 11:56:37 +00:00
Henrik Andersson
9c7aacbd6e Modified the protocol negotiation chain to retry with following
fallback order CredSSP -> TLS -> Plain RDP.

This should fix the bug 3589086.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1683 423420c4-83ab-492f-b58f-81f9feb106b5
2012-11-29 07:43:05 +00:00
Henrik Andersson
91d026f52c Reworked the logging to console to be simpler.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1680 423420c4-83ab-492f-b58f-81f9feb106b5
2012-11-22 07:57:38 +00:00
Henrik Andersson
51014c91df Initial implementation of kerberos server autentication with CredSSP,
disabled by default and is enabled using argument --enable-credssp
to configure script.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1676 423420c4-83ab-492f-b58f-81f9feb106b5
2012-11-15 11:21:01 +00:00
Peter Åstrand
f5f7ce6301 Improve error message upon SSL_CERT_NOT_ON_SERVER.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1671 423420c4-83ab-492f-b58f-81f9feb106b5
2012-10-23 11:38:59 +00:00
Henrik Andersson
c44025aa18 Added support for protocol negotiation, this is a part of
adding Enhanced RDP Security support to rdesktop and brings
support for TLSv1 tunnel functionality.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1659 423420c4-83ab-492f-b58f-81f9feb106b5
2012-06-15 05:16:20 +00:00
Peter Åstrand
b638882347 Include emails in copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1615 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:13:04 +00:00
Peter Åstrand
27068f53f8 Updated the copyright notices for the things we have been working on.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1612 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 08:55:42 +00:00
Peter Åstrand
281d7c9f06 Changed license to GPLv3
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1534 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 08:31:06 +00:00
Peter Åstrand
d00373436a Avoid code duplication in iso_connect/iso_reconnect.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1526 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-07 18:42:47 +00:00
Jay Sorg
88855ddcbf update the copyright year
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1474 423420c4-83ab-492f-b58f-81f9feb106b5
2008-07-11 03:51:23 +00:00
Matt Chapman
33669ac780 Extra sanity checking.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1433 423420c4-83ab-492f-b58f-81f9feb106b5
2008-02-14 11:45:13 +00:00
Jay Sorg
6091381a81 prefix BOOL with RD_
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1371 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-08 04:47:06 +00:00
Jay Sorg
797df4fa02 copyright year update
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1364 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 05:39:39 +00:00
Peter Åstrand
75ea7d9148 Applied patch #1247780 (slightly modified) from Brian Chapeau: Session Directory support.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@976 423420c4-83ab-492f-b58f-81f9feb106b5
2005-08-08 19:15:57 +00:00
Michael Gernoth
ec643e4718 bump version to 1.4.0
change year in files
add missing docu for updated commandline-flags
update changelog


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@827 423420c4-83ab-492f-b58f-81f9feb106b5
2005-03-06 21:11:18 +00:00
Jay Sorg
125922c748 bring the rdp5 packets through the various layers
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@732 423420c4-83ab-492f-b58f-81f9feb106b5
2004-07-05 19:09:07 +00:00
Peter Åstrand
aff94af70f Indentation fix.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@438 423420c4-83ab-492f-b58f-81f9feb106b5
2003-08-11 11:08:19 +00:00
Jay Sorg
d49e190f92 more g_ prefix for global vars
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@437 423420c4-83ab-492f-b58f-81f9feb106b5
2003-08-01 17:01:58 +00:00
Matt Chapman
2c32c1ec3a Eliminate previous ugly hack for RDP5 packets, in order to make it work
with low encryption.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@422 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-17 08:44:32 +00:00
Erik Forsberg
42764b0104 Remade connection setup. Send mstshash in initial packet.
(This might not be needed, but the more lookalike to a MS client we are,
 the better).

Recognize RDP5 packets and hand them to the RDP5 parsing routine.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@346 423420c4-83ab-492f-b58f-81f9feb106b5
2003-03-27 13:11:58 +00:00
Matt Chapman
b120a50f44 Update copyright dates on all files that have changed.
Bump version to 1.2-cvs.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@206 423420c4-83ab-492f-b58f-81f9feb106b5
2002-09-26 14:26:46 +00:00
Matt Chapman
5514330916 foo function() -> foo function(void) to conform to ANSI C.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@191 423420c4-83ab-492f-b58f-81f9feb106b5
2002-09-24 07:59:14 +00:00
Peter Åstrand
0685b1b65c Fixed indentation with indent
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@63 423420c4-83ab-492f-b58f-81f9feb106b5
2002-07-18 16:38:31 +00:00
Matt Chapman
e867eb6fd1 Add a ui_select to xwin.c to reduce latency.
Remove extraneous error messages - only report at lowest level.
Endianness and IRIX compile fixes.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@32 423420c4-83ab-492f-b58f-81f9feb106b5
2001-09-15 12:34:34 +00:00
Matt Chapman
24ea31f68a Portability fixes, including elimination of variable argument macros.
Rudimentary configure script.
Miscellaneous cleanups.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@29 423420c4-83ab-492f-b58f-81f9feb106b5
2001-09-14 13:51:38 +00:00
Matt Chapman
75717d8ab6 Changed indentation style (-psl).
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@24 423420c4-83ab-492f-b58f-81f9feb106b5
2001-01-06 03:47:04 +00:00
Matt Chapman
b9613445f9 ran indent (-bli0 -i8 -cli8 -npcs -npsl)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@23 423420c4-83ab-492f-b58f-81f9feb106b5
2001-01-06 03:12:10 +00:00
Matt Chapman
cd9b5a8761 Major commit of work from laptop - done in various free moments.
Implemented encryption layer and some basic licensing negotiation.
Reorganised code somewhat. While this is not quite as clean, it is
a lot faster - our parser speed was becoming a bottle-neck.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@9 423420c4-83ab-492f-b58f-81f9feb106b5
2000-08-15 10:23:24 +00:00
Matt Chapman
e11a571f14 Committing some awesome progress I made while overseas - this commit
really embodies a huge number of changes. We are now able to talk quite
fluently to a French NT Terminal Server - in normal usage only minor
font issues remain (handling of TEXT2 order is not perfect).

The next major hurdle is encryption, and it will be quite a big hurdle
- there seems to be some quite nasty session key stuff.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@8 423420c4-83ab-492f-b58f-81f9feb106b5
2000-07-25 12:34:29 +00:00
Matt Chapman
34f82f3e18 This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@3 423420c4-83ab-492f-b58f-81f9feb106b5
2000-05-10 07:36:34 +00:00