Commit Graph

46 Commits

Author SHA1 Message Date
Armin Novak
3ba66db99d Unify pReceiveChannelData and psPeerReceiveChannelData
Fix definitions of the two function pointers.
Use and definition did not match, fix that.
Will create warnings in external projects
2020-03-10 12:21:14 +01:00
Armin Novak
d5b5088eac Fixed misinterpretation of SendChannelData
SendChannelData was defined with a return value of type int, but
used as BOOL everywhere. Fix the definition to match use.
2020-03-10 12:21:14 +01:00
Armin Novak
d7ba252cd7 Fixed arguments for peer->ReceiveChannelData 2020-03-04 14:52:19 +01:00
Armin Novak
b3179174ec Fixed function pointer const correctness. 2020-03-04 14:44:03 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
David Fort
f4b7a27c2b license: implement server-side management
Add server-side management of the licensing workflow. The default
behaviour is to accept the client, but if a server wants to implement
full licensing support as in MS-RDPELE it is possible by defining a callback.
2019-01-21 09:57:15 +01:00
Armin Novak
ec0a0fef2a Added const to function buffer pointers 2018-08-01 12:56:18 +02:00
davewheel
4bfb4dddbf Add a callback to provide NTLM hashes on server-side
Adds a callback that allows servers to compute NTLM hashes by themselves. The typical
use of this callback is to provide a function that gives precomputed hash values.

Sponsored by: Wheel Systems (http://www.wheelsystems.com)
2017-05-18 14:24:24 +02:00
David Fort
7b437178bb Add a ClientCapabilities callback
This callback is called when the client capabilities have been received. This callback
appears to be more useful than the Capabilities one that is called just before the server
sends its capabilities.
2017-02-21 23:44:47 +01:00
David Fort
f68888a978 Add a callback that allows to adjust monitors layout
This callback is useful in server mode when you want to adjust the monitor
layout just before the server monitor layout PDU is built and sent.
2017-01-19 18:05:44 +01:00
zihao.jiang
b58ee586e7 keeping the old callback and adding the new one at the end of the struct, so that it can be potentially binary compatible. 2016-10-29 00:28:10 +08:00
zihao.jiang
ddc326d6d3 Fix server side code to be aware of rereadEvent 2016-10-27 23:43:09 +08:00
David Fort
f92860de87 Applied astyle formatting 2016-10-14 15:12:48 +02:00
David Fort
71fd5cc148 Limit the time passed in transport check loop
This patch make it possible to limit the time that is passed when we call
XXX_check_fds functions. This should smooth the treatment between handling inputs
and handling incoming bitmap updates.
The default maximum time is set to 100 ms.
2016-10-14 15:12:48 +02:00
Norbert Federa
ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Vic Lee
152d525a05 libfreerdp-core: server-side auto-detect feature. 2014-10-29 00:49:49 +08:00
Marc-André Moreau
00e3533230 libfreerdp-core: expose API for FreeRDS WTSVirtualChannelRead 2014-10-10 17:19:38 -04:00
Marc-André Moreau
11ae267518 libfreerdp-core: expose new API to allow FreeRDS virtual channel hooking 2014-10-10 16:11:42 -04:00
Marc-André Moreau
8ae00f7385 shadow: start hooking X11 code as subsystem 2014-07-11 19:30:40 -04:00
Hardening
dd6d829550 Allow transport_write calls to be non-blocking
This big patch allows to have non-blocking writes. To achieve
this, it slightly changes the way transport is handled. The misc transport
layers are handled with OpenSSL BIOs. In the chain we insert a
bufferedBIO that will bufferize write calls that couldn't be honored.

For an access with Tls security the BIO chain would look like this:
  FreeRdp Code ===> SSL bio ===> buffered BIO ===> socket BIO

The buffered BIO will store bytes that couldn't be send because of
blocking write calls.

This patch also rework TSG so that it would look like this in the
case of SSL security with TSG:
                                         (TSG in)
                              > SSL BIO => buffered BIO ==> socket BIO
                             /
FreeRdp => SSL BIO => TSG BIO
                             \
                              > SSL BIO => buffered BIO ==> socket BIO
                                        (TSG out)

So from the FreeRDP point of view sending something is only BIO_writing
on the frontBio (last BIO on the left).
2014-05-21 17:42:31 +02:00
Marc-André Moreau
8a81208059 libfreerdp-core: move server-side virtual channels back into core 2014-02-15 17:42:59 -05:00
Marc-André Moreau
1fab70504f libfreerdp-core: properly attach tcp event handle for peers 2013-07-20 22:34:05 -04:00
Marc-André Moreau
208c9f844a freerdp: fix core API bugs 2013-06-13 21:34:46 -04:00
Vic Lee
104ff8169d include: add missing extern C decls. 2013-01-22 22:48:52 +08:00
Marc-André Moreau
709e66a596 libfreerdp: header cleanup 2012-12-14 00:25:48 -05:00
Corey C
0905ae6f1f wfreerdp-server: merged upstream 2012-10-11 17:14:55 -04:00
Marc-André Moreau
9d064171a7 freerdp: get rid of old types 2012-10-09 03:26:39 -04:00
Marc-André Moreau
1bf8a45519 freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 2012-10-09 03:01:37 -04:00
Marc-André Moreau
1ed644786c freerdp: change boolean type to BOOL type 2012-10-09 02:38:39 -04:00
Marc-André Moreau
e60a092d81 freerdp: fix headers 2012-10-08 23:02:04 -04:00
Corey C
715a172fe8 wfreerdp-server: improved tracking of peers by id 2012-10-06 16:57:58 -04:00
Marc-André Moreau
a11615aebd wfreerdp-server: add PeerLogon callback for server logon 2012-09-16 15:30:11 -04:00
Vic Lee
eaaedbe785 libfreerdp-core/peer: add activated flag. 2012-06-24 22:20:45 +08:00
Vic Lee
ada9936a66 libfreerdp-core/server: add local flag for unix connection. 2012-05-22 23:10:52 +08:00
Vic Lee
4050944f6e server: implement frame acknowledge PDU. 2012-05-11 16:35:11 +08:00
Vic Lee
3a407c24b8 server: implement user-initiated disconnection sequence on server. 2012-04-13 15:58:28 +08:00
Marc-André Moreau
0ed4709167 libfreerdp-core: add server-side capabilities callback 2011-12-14 15:08:09 -05:00
Vic Lee
703e253e9f libfreerdp-core: add channel data sending/receiving for server. 2011-12-10 16:41:29 +08:00
Vic Lee
4b6dd6f14d server: follow context_size change. 2011-10-30 13:43:04 +08:00
Vic Lee
296d5ea753 server: use rdpContext for server-side components. 2011-10-18 15:10:12 +08:00
Marc-André Moreau
5c25717eae xfreerdp-server: encode a single tile from X11 at a hardcoded position 2011-09-13 19:03:06 -04:00
Vic Lee
d3f9a2a9ab server: add Activate callback to correctly handle reactivation. 2011-09-06 18:48:17 +08:00
Vic Lee
57ac9a59eb server: add input callbacks. 2011-08-23 11:52:35 +08:00
Vic Lee
ab7a53ea51 server: add PostConnect callback. 2011-08-23 11:52:34 +08:00
Vic Lee
9ea3f1e5bd server: rename pc prefix to ps. 2011-08-19 01:13:37 +08:00
Vic Lee
5fc87c25cf server: create initial server API. 2011-08-18 16:06:32 +08:00