Commit Graph

38 Commits

Author SHA1 Message Date
669e3a9e11 Second Batch: Update files using ChatGPT 4o 2024-05-31 15:52:13 +02:00
Pierre Ossman
1475092762 Avoid nesting stream macros
It only works by luck here, so avoid this style as bugs easily happen.
2019-06-13 14:23:02 +02:00
Pierre Ossman
25b8412333 Avoid poking around in STREAM internals
It's easy to make mistakes this way, and bypassed the normal bounds
checking. So make sure we always use macros or functions.
2019-05-06 14:33:38 +02:00
Pierre Ossman
655c3d56df Clean up channel chunk sending code
Make sure the buffer handling is a bit more sane so we can verify
offsets and boundaries. Also adds some more helper macros to shuffle
data between two different STREAM instead of trying to poke around
in the internals.
2019-05-06 14:33:05 +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
Alexander Zakharov
85f99edd65 Update copyrights 2019-02-01 11:21:32 +03:00
Alexander Zakharov
774a657975 Handle insufficient server side buffer for smartcard operations
We should pay attention to OutputBufferLength of DR_CONTROL_REQ
and send STATUS_BUFFER_TOO_SMALL if it's insufficient for returned
result.
2019-01-23 16:12:21 +03:00
Henrik Andersson
c16b74a974 Run indent-all.sh script on source 2018-10-29 15:53:57 +01:00
Cendio
2f03f65efe Add Dynamic Virtual Channels and basic RDPEDISP support
Fix issue #192

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2017-11-09 15:39:39 +01:00
Henrik Andersson
896a923f55 Markup unused parameters 2017-10-20 11:05:52 +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
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
094f3bac04 Fixed style of a few copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1635 423420c4-83ab-492f-b58f-81f9feb106b5
2011-09-28 09:36:59 +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
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
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
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
Michael Gernoth
c3f49ea246 more smartcard locking fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1327 423420c4-83ab-492f-b58f-81f9feb106b5
2006-11-03 23:51:35 +00:00
Pierre Ossman
9fb01276f2 Give virtual channel debug output its own switch.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/branches/seamlessrdp-branch/rdesktop@1195 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-24 15:34:32 +00:00
Peter Åstrand
b06a70bf51 Initial support for SeamlessRDP
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/branches/seamlessrdp-branch/rdesktop@1088 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-10 08:50:43 +00:00
Peter Åstrand
7b55ece8e4 Added support for a new virtual channel, lspci, which makes it
possible for the remote RDP server to enumerate the local PCI devices.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1052 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-02 15:22:25 +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
Peter Åstrand
d80c5d4d7b Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@716 423420c4-83ab-492f-b58f-81f9feb106b5
2004-06-17 09:42:58 +00:00
Jay Sorg
772bdd5628 changes to compile with g++
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@710 423420c4-83ab-492f-b58f-81f9feb106b5
2004-06-15 22:45:12 +00:00
Matt Chapman
826ceb5d4a Fix compile warnings on HP-UX.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@535 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-31 04:29:57 +00:00
Michael Gernoth
70ac0848d1 fix for compiler-warning
channels.c:135: warning: `channel' might be used uninitialized in this function


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@505 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-19 12:20:38 +00:00
Peter Åstrand
3a323bbcc1 Fixed indentation
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@498 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-15 14:01:32 +00:00
Erik Forsberg
0e61021203 If the channel has the CHANNEL_OPTION_SHOW_PROTOCOL set, the flags in
continuation packets must have the flag as well, not only the first packet.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@472 423420c4-83ab-492f-b58f-81f9feb106b5
2003-09-27 12:14:25 +00:00
Matt Chapman
e88b67c9ef Fix defragmentation code.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@445 423420c4-83ab-492f-b58f-81f9feb106b5
2003-08-18 04:52:51 +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
Jay Sorg
de7a67cd41 preceeded more global vars with g_
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@436 423420c4-83ab-492f-b58f-81f9feb106b5
2003-07-28 21:41:12 +00:00
Peter Åstrand
7ff54cdd90 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@434 423420c4-83ab-492f-b58f-81f9feb106b5
2003-07-09 09:18:20 +00:00
Matt Chapman
5b9286e6ea Commit of work in progress on channels (so that other people can hack on
RDPSND), in particular:
* channel layer takes care of virtual channel header
* split X dependent parts out of CLIPRDR, simplified IPC implementation
* initial RDPDR implementation


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@431 423420c4-83ab-492f-b58f-81f9feb106b5
2003-07-01 09:31:25 +00:00
Erik Forsberg
f335405bc5 Added comment about TAG_SRV_SRV_3. And some debug output.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@418 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-11 07:12:18 +00:00
Erik Forsberg
64be4d1174 Channel handling, initial revision.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@399 423420c4-83ab-492f-b58f-81f9feb106b5
2003-06-06 10:10:19 +00:00