Commit Graph

340 Commits

Author SHA1 Message Date
Marc-André Moreau
36cb1e6dc9 Merge pull request #2639 from awakecoding/master
WLog, server-side rdpdr, remote assistance, byteswap, etc
2015-05-22 14:30:11 -04:00
Marc-André Moreau
649d49549e Merge pull request #2644 from xhaakon/shadow-server-disposal
shadow_client: dispose encomsp and remdesk
2015-05-22 14:15:31 -04:00
Jakub Adam
bc1bbe61a8 shadow_client: dispose encomsp and remdesk
Their threads were kept running after the client's exit.
2015-05-22 14:01:29 +02:00
Jakub Adam
9e60246a8c Don't dispose shadow server before all clients have disconnected
Ensure all client threads are disconnected before we stop the server
thread and thus make it available for deletion. We do this because
shadow_client_context_free() accesses rdpShadowServer structure, which
we have to keep alive as long as it is needed.

Calling shadow_client_context_free() after shadow_server_stop() and
shadow_server_free() were called may have caused an application crash.
2015-05-22 13:56:57 +02:00
David FORT
b01d64d386 Specify to skip compression with remoteFx frames 2015-05-22 11:12:41 +02:00
Marc-André Moreau
5526348079 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-05-21 13:29:59 -04:00
Norbert Federa
535a4352a7 shadow/client context cleanup and unused vars fix 2015-05-21 16:05:05 +02:00
Norbert Federa
cd0a8e0506 Merge pull request #2630 from hardening/new_2616
Add checks for some XXX_New and XXX_Add functions
2015-05-21 16:04:26 +02:00
Marc-André Moreau
ebf863f2eb Merge pull request #2557 from realjiangms/shadow_fix_hang2395
shadow fix multi-client hang
2015-05-20 16:26:31 -04:00
David FORT
29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02:00
Marc-André Moreau
29d14773c8 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	client/Windows/wf_client.c
	libfreerdp/common/assistance.c
2015-05-20 10:12:24 -04:00
Hardening
f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
MartinHaimberger
e3236c2317 Merge pull request #2605 from nfedera/fix-2015-05-08-01
fixed multiple missing gdi return value checks
2015-05-11 16:59:32 +02:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
zihao.jiang
85dd90d817 shadow fix multi-client hang
Merge from commit d4df3a952b
Conflicts:

	server/shadow/shadow_subsystem.c
2015-05-11 00:04:07 +08:00
Norbert Federa
71a4349928 fixed multiple missing gdi return value checks
mainly gdi_Create* functions
2015-05-08 21:39:23 +02:00
Marc-André Moreau
30dd40e10a wfreerdp: fix and improve remote assistance 2015-05-07 14:20:49 -04:00
Norbert Federa
82843f0700 server/shadow: added missing error message 2015-05-07 17:42:01 +02:00
Norbert Federa
f9f59cd29b Fix unchecked CreateDirectory calls 2015-05-07 13:28:13 +02:00
Norbert Federa
25fc866a58 Fix unchecked CreateThread calls and misc fixes 2015-05-05 13:55: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
Norbert Federa
84577b1ca7 codec/rfx: error checking and various fixes
- removed some unneeded null checks for free()
- fixed a memory leak in shadow_client
- removed rfx_compose_message_header from API

Changed the following functions to BOOL, check the result
where they are called and handle failures:
- rfx_compose_message
- rfx_compose_message_header
- rfx_write_tile
- rfx_write_message_tileset
- rfx_write_message_frame_begin
- rfx_write_message_region
- rfx_write_message_frame_end
- rfx_write_message

rfx_process_message:
- check memory allocation failures
- verify protocol-conform order of data messages to prevents memory
  leaks caused by repeated allocations
- verify that header messages were parsed/received before the
  data messages
- treat unknown rlgr mode as error
- fixed/added error handling
- fixed all callers to check/handle result

rfx_encode_message:
- fixed incorrect usage of realloc
- missing malloc check
- missing check of CreateThreadpoolWork
- correct cleanup on failure (threadpool, memory)
- check rfx_encode_message result

rfx_encode_messages:
- check rfx_split_message result
- correct cleanup on failure
- prevent memory leak on failure

rfx_write_message_context:
- fixed invalid channelId value (must be 0xFF for WBT_CONTEXT)

rfx_process_message_codec_versions:
- fixed invalid read size of codec_version (it is 16bit)

rfx_process_message_channels:
- verify protocol conform channelId value

rfx_process_message_region:
- replaced invalid reallocs with malloc
- read and verify regionType and numTileSets from stream

rfx_process_message_tileset:
- check allocation results
- fixed incorrect usages of realloc

setupWorkers:
- fixed incorrect usages of realloc

rfx_split_message:
- removed dead code
- missing malloc check

rfx_compose_message:
- fixed a memory leak
- check/handle rfx_encode_message result
2015-04-23 15:42:21 +02:00
Hardening
6cd7713e12 Merge pull request #2544 from bmiklautz/boolenization
change return types of callbacks to BOOL
2015-04-22 11:01:27 +02:00
Armin Novak
65a4c6e1fc Changed listener callback arguments and return. 2015-04-21 15:57:25 +02:00
Bernhard Miklautz
1e6943bf31 Fix formating 2015-04-21 14:20:24 +02:00
Bernhard Miklautz
515502ffa5 change return types of callbacks to BOOL
* change all client/server callbacks to BOOL
* update all clients accordingly
* add multiple return value checks
* small fixes
2015-04-21 14:18:07 +02:00
Armin Novak
6e213bc61b Modified GetEventHandles of listener
Now using nCount as in and out argument.
When called, set nCount to the number of available handles.
This value is checked and an error returned, if not enough
handles are available.
2015-04-21 12:09:44 +02:00
Petr Sumbera
17df42e4b5 Fixes some build issues on Solaris 11. 2015-02-02 08:48:54 -08:00
Bernhard Miklautz
43beef36ff rdtk/shadow: install libraries versioned 2014-12-12 19:26:23 +01:00
Armin Novak
547054a48b Fixed uninitialized value. 2014-12-07 00:23:46 +01:00
Marc-André Moreau
7881ec762e server/shadow: avoid sending pointer updates when not active, fix remdesk leak 2014-11-21 15:10:39 -05:00
Marc-André Moreau
8a7a71a7b6 Merge pull request #2213 from akallabeth/wlog_callback_appender
Wlog callback appender
2014-11-17 09:41:58 -05:00
Armin Novak
c44f85c2b4 Fixed memory leak. 2014-11-17 00:42:05 +01:00
Armin Novak
f34ee395eb Fixed memory leak. 2014-11-17 00:34:17 +01:00
Armin Novak
d9b889ddb7 Fixed memory leak. 2014-11-17 00:33:37 +01:00
Armin Novak
232aa89efd Fixed memory leak. 2014-11-17 00:22:33 +01:00
Armin Novak
7c3adc8449 Fixed nonnull warning. 2014-11-17 00:21:04 +01:00
Armin Novak
8d4589b1e1 Replaced fprintf error messages with WLog. 2014-11-16 12:21:38 +01:00
Marc-André Moreau
04299bb18b shadow: improve pointer updates 2014-11-07 13:51:10 -05:00
Marc-André Moreau
a538e791b3 shadow: add improved pointer updates 2014-11-06 17:25:41 -05:00
Marc-André Moreau
ad611b5c09 Merge branch 'master' of github.com:awakecoding/FreeRDP 2014-11-04 10:34:06 -05:00
Marc-André Moreau
eea475b436 shadow: fix null ClientDir 2014-10-29 16:11:22 -07:00
Marc-André Moreau
d85a2bf3e6 shadow: fix bitmap update fragmentation 2014-10-25 15:36:36 -04:00
Armin Novak
89bb28adb2 Fixed setting of RV_VERSION_PATCH, now BUILD_NUMBER is used for every library.
Executable names are now correctly set, using CMAKE_EXECUTABLE_SUFFIX now.
Fixed version defines for winpr executables.
2014-10-09 16:18:35 +02:00
Armin Novak
5364a834c4 Added windows version information to build. 2014-10-03 15:17:40 +02:00
Marc-André Moreau
7da4621334 librdtk: improve text positioning 2014-10-01 12:18:17 -04:00
Marc-André Moreau
24b594d592 librdtk: stub NinePatch, TextField and Button 2014-09-30 14:54:36 -04:00
Marc-André Moreau
abd87ace55 rdtk: initial commit 2014-09-29 16:08:08 -04:00
Marc-André Moreau
169a9c83ee shadow: initial font rendering 2014-09-29 14:07:48 -04:00
Marc-André Moreau
6eeace868b shadow: start bitmap font loader 2014-09-28 21:41:12 -04:00
Marc-André Moreau
668aa17a22 shadow: add X11 PAM authentication 2014-09-26 19:03:48 -04:00
Marc-André Moreau
315d16a978 shadow: fix X11 extended keycodes 2014-09-26 17:51:45 -04:00
Marc-André Moreau
255bd6f7a2 shadow: fix bitmap updates 2014-09-24 13:17:52 -04:00
Marc-André Moreau
41282e569f shadow: fix surface frame markers 2014-09-24 12:10:02 -04:00
Marc-André Moreau
ea84067c80 shadow: add workaround for Mac RDP client 2014-09-23 21:05:10 -04:00
Marc-André Moreau
8123a1d9b8 libfreerdp-codec: refactor NSCodec 2014-09-23 20:00:26 -04:00
Marc-André Moreau
af858e8f2a shadow: disable RemoteFX if connection type is not LAN 2014-09-23 18:19:05 -04:00
Marc-André Moreau
7574788ba5 libfreerdp-core: fix GCC core data block negotiation 2014-09-22 11:38:33 -04:00
Marc-André Moreau
343947143e shadow/X11: fix color depth check 2014-09-22 10:06:16 -04:00
Marc-André Moreau
e20ff661e3 shadow: disable unsupported X11 color depths 2014-09-22 09:59:56 -04:00
Marc-André Moreau
c4ad706c34 libfreerdp-core: improve bitmap codec negotiation 2014-09-21 15:40:27 -04:00
Marc-André Moreau
86c7f46b76 shadow: improve bitmap update performance 2014-09-20 16:29:13 -04:00
Marc-André Moreau
45b9a5454e libfreerdp-codec: improve compressor interfaces 2014-09-20 15:25:33 -04:00
Marc-André Moreau
d6250b1aec shadow: improve Mac subsystem 2014-09-19 19:58:49 -04:00
Marc-André Moreau
c4588fb14f libfreerdp-core: remove dependency on OPENSSL_Applink on Windows 2014-09-19 17:11:56 -04:00
Marc-André Moreau
3ddbb128cc libfreerdp-core: add SurfaceFrameBits function to combine frame marker with surface commands 2014-09-19 14:23:17 -04:00
Marc-André Moreau
aa2e6dacbb shadow: fix frame acks + bitmap negotiation 2014-09-19 12:06:12 -04:00
Marc-André Moreau
09fc388e03 shadow: add RefreshRect/SuppressOutput support 2014-09-18 22:18:58 -04:00
Marc-André Moreau
aa7571648c shadow: start using message queue 2014-09-18 17:22:44 -04:00
Marc-André Moreau
7ef55ab9b7 shadow: improve subsystem structure 2014-09-18 15:43:11 -04:00
Marc-André Moreau
a5f8bdf51c shadow: add EnumMonitor functions 2014-09-18 14:29:42 -04:00
Marc-André Moreau
527638c691 shadow: delay subsystem initialization for monitor enumeration 2014-09-18 13:06:49 -04:00
Marc-André Moreau
a77279fb4c shadow: fix and improve config path detection 2014-09-18 10:06:59 -04:00
Marc-André Moreau
48d15998e7 shadow: add common subsystem code 2014-09-17 22:58:57 -04:00
Marc-André Moreau
e84e7928e3 server/shadow: split into library + executable 2014-09-17 21:18:47 -04:00
Marc-André Moreau
6afd621d4c Merge branch 'master' of github.com:awakecoding/FreeRDP into shadow
Conflicts:
	server/Mac/mf_audin.c
	server/Mac/mf_event.c
	server/Mac/mf_info.c
	server/Mac/mf_mountain_lion.c
	server/Mac/mf_peer.c
	server/Mac/mf_rdpsnd.c
	server/Mac/mfreerdp.c
	server/shadow/CMakeLists.txt
2014-09-17 20:15:01 -04:00
Marc-André Moreau
25f1073aa5 freerdp: fix build problems 2014-09-17 19:19:37 -04:00
Marc-André Moreau
c66f272342 shadow: fix encoder grid bug 2014-09-17 15:19:35 -04:00
Armin Novak
17991386b3 Fixed log level of error message. 2014-09-16 10:17:54 +02:00
Armin Novak
73a735e400 Decreased logging verbosity. 2014-09-15 20:06:35 +02:00
Armin Novak
72f06bdcdf Decreased logging verbosity. 2014-09-15 19:56:21 +02:00
Armin Novak
5b5791c8d7 Using wlog for server now. 2014-09-15 08:55:00 +02:00
Marc-André Moreau
41814b1b1c shadow/mac: add keyboard support 2014-09-14 20:23:40 -04:00
Marc-André Moreau
06dc76bce2 shadow/mac: add initial screen capture support 2014-09-14 20:08:38 -04:00
Marc-André Moreau
464f74805e shadow/mac: add mouse movement 2014-09-13 13:21:34 -04:00
Marc-André Moreau
6a1b76e42a shadow/mac: add monitor detection 2014-09-13 13:12:55 -04:00
Marc-André Moreau
aa49e63cda mfreerdp-server: fix build 2014-09-13 12:33:33 -04:00
Bernhard Miklautz
0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Marc-André Moreau
a16252d78b shadow: add initial cursor blending 2014-09-10 22:52:19 -04:00
Marc-André Moreau
f90f859f49 shadow: add X11 cursor monitoring 2014-09-10 19:04:28 -04:00
Marc-André Moreau
e1e8da9490 shadow: add ability to share rectangle within monitor 2014-09-10 16:27:24 -04:00
Marc-André Moreau
34756850e4 shadow: add ability to select monitor to share 2014-09-10 14:58:14 -04:00
Bernhard Miklautz
0e18ee6de2 build: fix compilation for non monolithic builds
set_complex_link_libraries isn't required anymore for winpr
since it's always build monolithic.
2014-08-19 11:59:47 +02:00
Marc-André Moreau
ca90650336 shadow: fix race conditions 2014-08-15 18:12:53 -04:00
Marc-André Moreau
536697d63b shadow: fix build for Windows XP 2014-08-15 16:06:08 -04:00
Marc-André Moreau
09ae1ac9ca shadow: initial working support for WDS+RDP backend 2014-08-15 14:57:09 -04:00
Marc-André Moreau
0457a29f57 shadow: fix WDS connectivity 2014-08-15 14:15:53 -04:00
Marc-André Moreau
df146fe70d shadow: fix RDP security 2014-08-15 13:50:22 -04:00
Marc-André Moreau
9adaadb93a shadow: add more virtual channels to RDP backend like WDS API 2014-08-14 19:23:48 -04:00
Marc-André Moreau
158f9856ba shadow: start RDP client backend for WDS 2014-08-14 18:41:22 -04:00
Marc-André Moreau
97cd85803d shadow: initial WDS working setup 2014-08-14 13:10:43 -04:00
Marc-André Moreau
ec831a3ce0 shadow: improve WDS subsystem 2014-08-13 20:12:09 -04:00
Marc-André Moreau
86a68f0c0f shadow: start Windows Desktop Sharing API support 2014-08-13 17:48:57 -04:00
Marc-André Moreau
142d77b8c9 shadow: move DXGI 1.2 code to separate file 2014-08-12 19:22:42 -04:00
Marc-André Moreau
1ba42dccf3 shadow: improve DXGI support 2014-08-12 16:57:58 -04:00
Marc-André Moreau
90d202ab87 server: fix build on Windows 2014-08-11 19:31:38 -04:00
Marc-André Moreau
54264936d1 shadow: improve synchronization barrier usage 2014-08-08 20:51:26 -04:00
Marc-André Moreau
8b4cf07c8a shadow: make use of synchronization barrier 2014-08-08 18:47:46 -04:00
Marc-André Moreau
fdab87cba0 shadow: improve invalid region detection 2014-08-07 12:36:45 -04:00
Marc-André Moreau
d9d9bf3609 shadow: start detecting invalid regions manually 2014-08-06 17:51:38 -04:00
Marc-André Moreau
4f41f03ad7 shadow: fix X11 non-XShm support 2014-08-06 14:18:34 -04:00
Marc-André Moreau
9838200068 libfreerdp-core: fix unix domain socket support 2014-08-06 12:08:00 -04:00
Marc-André Moreau
c45ddc783e shadow: improve DXGI 1.2 error checking 2014-07-18 17:26:21 -04:00
Marc-André Moreau
eae6efd23f shadow: make use of DXGI move rects 2014-07-18 00:33:55 -04:00
Marc-André Moreau
cfe722ec39 shadow: improve DXGI frame info management 2014-07-18 00:20:55 -04:00
Marc-André Moreau
67f0d18add shadow: initial Win8 DXGI 1.2 support 2014-07-17 22:38:10 -04:00
Marc-André Moreau
d8b858811f shadow: initial windows server-side connectivity 2014-07-17 21:15:22 -04:00
Marc-André Moreau
a732045c91 wfreerdp-server: restore Win8 DXGI 1.2 support 2014-07-17 18:27:40 -04:00
Marc-André Moreau
1f0e05c2b8 shadow: disable 24bpp 2014-07-16 15:12:20 -04:00
Marc-André Moreau
5e33c4899e shadow: reduce resource usage in encoder 2014-07-16 14:11:37 -04:00
Marc-André Moreau
58d83c9c1e shadow: stub Mac subsystem 2014-07-15 23:01:56 -04:00
Marc-André Moreau
f6d1d083e9 channels/remdesk: initial dummy server-side remote assistance message parsing 2014-07-15 18:38:32 -04:00
Marc-André Moreau
78520d5141 shadow: add basic server-side encomsp server 2014-07-15 16:34:15 -04:00
Marc-André Moreau
8c791907ab shadow: reset encoder on reconnection 2014-07-15 12:50:47 -04:00
Marc-André Moreau
99ad992709 shadow: add support for older bitmap codecs 2014-07-14 18:44:15 -04:00
Marc-André Moreau
e7fb6e67f5 shadow: add basic lobby functionality 2014-07-14 18:01:29 -04:00
Marc-André Moreau
f0ce0b8148 shadow: initial X11 multi-monitor support 2014-07-14 13:33:20 -04:00
Marc-André Moreau
8c9434f0dc shadow: remove header include dependency on subsystem 2014-07-13 21:20:36 -04:00
Marc-André Moreau
04aaf5d59d shadow: add support for frame acks 2014-07-13 19:42:57 -04:00
Marc-André Moreau
fb45c77996 shadow: improve X11 event handling 2014-07-13 17:30:39 -04:00
Marc-André Moreau
1ee4061eb4 shadow: consolidate X11 subsystem code 2014-07-13 15:58:31 -04:00
Marc-André Moreau
e9818e95ac shadow: hook X11 input 2014-07-12 01:18:08 -04:00
Marc-André Moreau
c865fed299 shadow: start hooking X11 subsystem with shadow server core 2014-07-12 00:01:29 -04:00
Marc-André Moreau
3d57659efb shadow: start structuring X11 code as shadow subsystem 2014-07-11 23:01:34 -04:00
Marc-André Moreau
5135467037 shadow: stub more components 2014-07-11 20:49:56 -04:00
Marc-André Moreau
8ae00f7385 shadow: start hooking X11 code as subsystem 2014-07-11 19:30:40 -04:00
Marc-André Moreau
7caf48bcf4 shadow: reduce X11 code 2014-07-11 18:30:56 -04:00
Marc-André Moreau
63f94ef150 shadow: further consolidate old X11 server code 2014-07-11 18:00:33 -04:00
Marc-André Moreau
01c557d1c3 shadow: start making generic core 2014-07-10 17:20:41 -04:00
Marc-André Moreau
369fb876c9 shadow: start simplifying X11 shadow server 2014-07-10 16:32:46 -04:00