Commit Graph

1529 Commits

Author SHA1 Message Date
Armin Novak
0e4ea3943a Unified sha1 functions. 2016-02-24 16:36:15 +01:00
Armin Novak
447ac23aee Refactored timezone functions. 2016-02-24 09:28:30 +01:00
David FORT
1b2b1c4ac1 Add support for saveSessionInfo PDU
This patch adds some callbacks so that the client can have access to the informations
stored in this packet. Server-side implementation is also there, so that a server
can send these informations to the client.
2016-02-18 14:19:36 +01:00
Hardening
2a3e9996b3 Merge pull request #2710 from akallabeth/cert_temp_accept_v2
Extended certificate callbacks.
2016-02-15 13:52:47 +01:00
Nathan Kidd
d68e58a9dc libfreerdp-codec: Make region16_rects() handle NULL nbRects
Now matches header documentation.  Also cleans up related doc grammar.
2016-02-12 10:11:51 -05:00
Armin Novak
b35f6658b9 Moved common code from cli clients to client lib. 2016-02-05 02:05:37 +01:00
Armin Novak
cbf2892ccc Implemented temporary certificate accept.
Certificates can now be accepted temporarily.
The callbacks for certificate validation have been
modified to extend the information presented to the user.
2016-02-05 02:04:57 +01:00
Armin Novak
cd05ea7452 Fixed error checks for command line parser. 2016-02-01 15:18:34 +01:00
Armin Novak
035f127081 Added get_build_config functions. 2016-01-28 14:26:50 +01:00
Hardening
d458bc2e06 Merge pull request #3073 from davewheel/cert_key_in_memory
Allow to specify the raw content of crypto materials
2016-01-27 10:50:38 +01:00
davewheel
d5b8585a39 Allow to specify the raw content of crypto materials
Sometime it's possible that your server application doesn't have access to files
(when running in a very restricted environment for example). This patch allows
to ship the private key and certificate as a string.

Sponsored by: Wheel Systems (http://www.wheelsystems.com)
2016-01-21 11:27:06 +01:00
davewheel
121a234866 Add better handling of monitors
This patch makes FreeRDP announce the support for monitor layout PDU. It also
adds support for servers to announce the monitors layout.
2016-01-20 16:56:04 +01:00
zihao.jiang
60ae27b00a server/shadow: Completely decouple subsystem implementations and shadow framework internal details.
It will be completely possible to implement subsystem with only include/freerdp/server/shadow.h and libfreerdp-shadow.

Details as following:
1. Exported surface structure as subsystem implementations deeply depend on it to send image update
2. Export capture APIs. They are actually indepent APIs to help compare and calculate image difference.
3. Introduce API to trigger client frame update. Conceal details in subsystem->updateEvent
4. Pass client to client callbacks. Subsystem implementation may need to know 'which client' send the interaction event as well as the authentication request.
Add this support in callback definition before anyone really use shadow framework APIs to implement a custom subsystem.
Also added callback for client capability exchange
5. Remove X11_ShadowSubsystem Mac_ShadowSubsystem Win_ShadowSubsystem from libfreerdp-shadow.
Discard FREERDP_API mark on ShadowSubsystemEntry functions and make them be compiled together with shadow.c in CMakeLists.txt.
This is required from PR #2751.
Now subsystem implementations and shadow.c could be regarded as an example for shadow framework.
2016-01-01 03:13:52 +08:00
Hardening
df81e842a5 Merge pull request #2932 from realjiangms/fix_gdi_brush
GDI: Fix usage of gdi_get_brush_pointer.
2015-12-18 10:50:51 +01:00
Bernhard Miklautz
97edeca204 Merge pull request #2874 from akallabeth/stdtypes
Using stdint.h and stdbool.h for type definitions
2015-12-17 16:37:54 +01:00
Roland Kaufmann
6f6f0b0c53 Move UnmapButtons settings to stable ABI section
The Miscellaneous section is chosen because choosing not to map the
buttons is not a property of the input system, but rather an ad-hoc
setting to be applied to this session.
2015-12-16 23:21:43 +01:00
Roland Kaufmann
600d3c5ccb Add option to disable pointer button mapping
In case the old behaviour of not reverse-mapping the mouse buttons is
desirable, a command-line option is added to disable the mapping. This
option is made experimental for the time being.

The default is to do the reverse mapping, as this is the intuitive
behaviour (the mouse then works as it would on the console).
2015-12-15 17:42:57 +01:00
Armin Novak
a5db7117c8 Implemented horizontal wheel support.
Horizontal mouse wheel input capabilities are now checked
and if available mouse buttons 6 and 7 are mapped to the
horizontal wheel for the X11 client.
2015-12-14 18:29:23 +01:00
Bernhard Miklautz
7f7ef1a464 Merge pull request #2831 from akallabeth/gdi_fix
Fixed GDI_BITMAP, now using custom deallocation function.
2015-12-14 17:58:25 +01:00
Hardening
c44dc17bc7 Merge pull request #2980 from akallabeth/clipboard_struct_fixes
Fixed CLIPRDR_FILEDESCRIPTOR
2015-12-14 16:09:47 +01:00
Armin Novak
74c15a6309 Fixed freerdp_assistance_file_new argument declaration 2015-12-14 14:18:50 +01:00
Armin Novak
75fc2010a7 Fixed CLIPRDR_FILEDESCRIPTOR 2015-11-18 09:50:52 +01:00
Armin Novak
f6e17ec65c Added audin support for mac os. 2015-11-12 16:10:39 +01:00
Bernhard Miklautz
d73c4898c1 Add build-config.h
build-config.h should contain configure/compile time settings that are
relevant for projects that use FreeRDP.

For example the compiled in plugin search paths.
2015-11-09 15:54:22 +01:00
Norbert Federa
3eee70b164 Merge pull request #2926 from bjcollins/rail_fixes
Rail fixes
2015-11-06 13:34:42 +01:00
Martin Fleisz
ab6485b3bf cliprdr/server: Add comment 2015-10-28 12:28:14 +01:00
Martin Fleisz
730f43a380 cliprdr/server: Provide the server with a possibility to configure capabilities 2015-10-27 17:12:33 +01:00
zihao.jiang
83d58ccfe8 GDI: Fix usage of gdi_get_brush_pointer.
Currently we get color from brush according to the offset in the paint region.
According to MSDN https://msdn.microsoft.com/en-us/library/dd183396(v=vs.85).aspx, it should get color according to dest position instead of offset in paint region.
2015-10-17 02:49:45 +08:00
bjcollins
cc676c4468 Remote app support
All window state order offsets are signed according to the RDP spec, lets treat them as such.
2015-10-15 18:18:21 -05:00
Marc-André Moreau
029cbf3aca libfreerdp-gdi: fix egfx multimon support 2015-10-13 15:50:39 -04:00
MartinHaimberger
d971116457 Merge pull request #2765 from akallabeth/connect_abort
Connect abort and unified TCP connect
2015-09-07 10:05:24 +02:00
Armin Novak
3b8043264f Resetting channel error on connect. 2015-09-03 13:46:17 +02:00
Norbert Federa
2d5e249eff Merge pull request #2825 from akallabeth/pointer_decoding_fix
Fixed color pointer decoding.
2015-09-01 11:09:42 +02:00
Marc-André Moreau
a700d1d02d Merge pull request #2716 from realjiangms/shadow_xor_pointer
server/shadow: Fix alpha pointer message so that it allows pixel with both 'xor' and 'and'
2015-08-27 10:20:18 -04:00
Marc-André Moreau
97c38e7d8c Merge pull request #2739 from realjiangms/shadow_resize
server/shadow: Enhancement regarding the screen and resolution - addresize support and fix subRect feature
2015-08-27 10:19:25 -04:00
Armin Novak
e6c23cb534 Implemented Async TCP connect with abort event
* Implemented unified freerdp_tcp_connect_timeout with connect abort.
* Implemented unified freerdp_tcp_connect_multi with connect abort.
* Added connect abort to freerdp_tcp_connect.
* Added freerdp_abort_connect and abortEvent.
2015-08-27 15:33:06 +02:00
Marc-André Moreau
223e0c7900 Merge pull request #2785 from MartinHaimberger/mh-channel-fix
Channel hardening and fixing
2015-08-27 09:24:10 -04:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Vic Lee
6f639c1e34 gcc: read and write desktop scale settings in core data. 2015-08-27 16:19:40 +08:00
Vic Lee
8394d8c677 gcc: read and write monitor extended data. 2015-08-27 15:26:37 +08:00
Armin Novak
db3fa9a0d2 Added gdi_CreateBitmapEx function. 2015-08-26 12:14:46 +02:00
Armin Novak
253a60aaf3 Fixed GDI_BITMAP, now using custom deallocation function.
gdi_surface_bits: Now properly discarding old bitmap before creating a new one.
2015-08-12 11:01:05 +02:00
Armin Novak
7983c2f457 Fixed duplicate int. 2015-08-06 14:43:39 +02:00
Armin Novak
4a62e6bee4 Added length arguments and checks. 2015-08-06 11:24:42 +02:00
Martin Haimberger
2862109337 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/smartcard/client/smartcard_main.c
	channels/smartcard/client/smartcard_operations.c
2015-07-30 07:29:12 -07:00
Martin Haimberger
65fd259610 misc fixes:
fixed all bugs from the review
checking all WaitFor*Object/s calls
2015-07-30 06:49:21 -07:00
Bernhard Miklautz
d9aca506d6 rdpsnd: include win32error.h
If using rdpsnd externally (for example in other projects) WIN32ERROR
needs to be defined otherwise some compilers might create a warning or
error.
2015-07-27 19:24:41 +02:00
Bernhard Miklautz
bfdf025e88 Merge pull request #2751 from realjiangms/shadow_fix_compile_error_win
server/shadow: Fix compile error on win32.
2015-07-20 17:23:23 +02:00
Martin Haimberger
e682329eeb fixed compiler errors 2015-07-15 03:17:38 -07:00
Martin Haimberger
6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
zihao.jiang
491978b0e3 server/shadow: Enhancement regarding the screen and resolution - add resize support and fix subRect feature
Detail fixes:
1. Add resize support in shadow framework layer
2. Enhance X11 implementation to detect desktop resolution change
3. Fix the subRect feature.
It seems not completely finished and it looks incompatible in different source code.
Fix it to be consistent in all source code as following:
a. The subRect is only awared in framework layer, subsystem implementation should not be aware of it. It only take effect at shadow_client and corresponding shadow_input.
b. The screen and surface should only represent a monitor screen. They don't need to consider subRect feature.
4. A lobby should be alternative image shown to client when the client is not 'mayView'.
We don't need to have seperate lobby for each client, move it into server structure as 'another surface'
5. Fix display handle leak in enum monitor of X11
6. Suppress BadMatch Error while capturing the image
2015-07-01 23:57:20 +08:00
zihao.jiang
f7a1b467cc server/shadow: Remove comments in define. 2015-07-01 22:28:51 +08:00
zihao.jiang
7a59f09ecf server/shadow: Fix compile error on win32. 2015-07-01 01:36:23 +08:00
zihao.jiang
2673a77905 server/shadow: Fix alpha pointer message so that it allows pixel with both 'xor' and 'and'.
Integrate idea from @bmiklautz: make convert_alpha_pointer_data function as common
2015-06-28 22:16:29 +08:00
zihao.jiang
457413727f server/shadow: Fix alpha pointer message so that it allows pixel with both 'xor' and 'and'.
Original pointer alpha update message is too specific for x11 implementation.
It doesn't allow pointer alpha mask with both 'xor' color and 'and' mask, e.g.: the 'edit' pointer in windows text box.

1. Move shadow_client_convert_alpha_pointer_data to x11 implementation as it is specific for x11.
2. Update message definition to be more generic: to accept 'xor/and' mask directly.
Implementation of subsystem can implement its own way to convert pointer mask data.
3. Fixed fault handling to free the resource allocated.
2015-06-28 22:16:29 +08:00
Marc-André Moreau
5ec19d2045 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-06-26 14:00:03 -04:00
Marc-André Moreau
24ed6b06cc channels/rdpgfx: update debug output 2015-06-26 13:59:41 -04:00
Norbert Federa
bb9536b867 libfreerdp/gdi: fixed gdi return value madness
Mostly booleanization to comply with the MS API
2015-06-26 14:32:38 +02:00
David FORT
a8fefae3a1 Harden the sound channel
This patch adds checks for the sound channel and plugins:

* checks for protocol bytes;
* checks for malloc/calloc;
* be more strict when interacting with sound plugin
2015-06-24 17:06:45 +02:00
Martin Fleisz
ccf5ba3194 Merge pull request #2717 from realjiangms/shadow_encoder_fps
server/shadow: shadow encoder related enhancement/fix.
2015-06-24 09:22:55 +02:00
zihao.jiang
e00655c3c2 server/shadow: shadow encoder related enhancement/fix.
1. Export fps related API so that subsystem implementation no longer need to know about details in encoder structure.
2. Discard frameList dictionary.
The 'value' in this dictionary is never used and not properly free'ed when client is disconnected.
The dictionary was used to calculate 'inflight' frame count. Once an ACK is received from client, an item in the dictionary is removed.
We then calculate 'inflight' frame by the count of the items in the dictionary.
However, some rdp clients (win7 mstsc) skips frame ACK if it is inactive, ACK of some frame would actually never arrive.
We actually don't need the dictionary. We only need to record the latest acknowledged frame id, and the difference between last sent frame id is the inflight frame count.
3. Minor fix in default fps calculation. encoder->frameAck is wrongly used as integer while it's actually bool flag.
2015-06-23 14:36:53 +08:00
Bernhard Miklautz
1b8dd139a9 cmd line: add missing checks
* strdup
* some allocs
2015-06-22 19:23:57 +02:00
Bernhard Miklautz
1f414ec9e7 codec/planar: regression - fix conflicting types
Update planar.h to fix the conflicting types of
freerdp_bitmap_planar_delta_encode_planes.
2015-06-22 19:21:47 +02:00
David FORT
7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Marc-André Moreau
750e752d45 Merge pull request #2697 from realjiangms/shadow_audio
Shadow server: fix channel disposal and add audio support. fix message mechanism in client
2015-06-22 09:52:53 -04:00
Marc-André Moreau
82179c7d8b Merge pull request #2698 from realjiangms/shadow_stand_alone
server/shadow: Decouple shadow_subsystem and subsystem implementation detail.
2015-06-22 09:39:17 -04:00
Marc-André Moreau
d10203c2a2 Merge pull request #2699 from realjiangms/shadow_connect_disconnect
server/shadow: add connect/disconnect anchor in subsystem callback
2015-06-22 09:38:46 -04:00
Marc-André Moreau
20f78405c8 Merge pull request #2684 from Skool/master
Add bépo layout
2015-06-22 09:31:15 -04:00
Martin Haimberger
0c3a62be7a hardend remdesk channel 2015-06-22 00:12:25 -07:00
Martin Haimberger
6e4e1c2773 Merge remote-tracking branch 'upstream/master' into mh-stream-fix
Conflicts:
	client/Windows/wf_cliprdr.c
2015-06-18 03:06:40 -07:00
Martin Haimberger
dc68bdfce5 channel rdpgfx hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
6348e41479 channel rdpei hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
d7636d0e28 channel rail hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
b9853f87eb channel encomsp hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
0cfbc6648b channel echo hardend 2015-06-18 03:04:32 -07:00
Martin Haimberger
0bf222ec50 hardend rdpdr channel 2015-06-18 03:04:32 -07:00
Martin Haimberger
dca53c132c hardend display channel 2015-06-18 03:04:32 -07:00
Martin Haimberger
e5d5cd3c94 hardend cliprdr
hardend cliprdr server and client
also updated all callbacks in the server and client
implementations
2015-06-18 03:04:31 -07:00
Martin Haimberger
156f86e487 hardend channel audin 2015-06-18 03:04:31 -07:00
Martin Haimberger
d06da4f1bd hardend drdynvc channel 2015-06-18 03:04:28 -07:00
zihao.jiang
2335a307cb server/shadow: integrate comment from @hardening
Return directly at subsystem->ClientConnect
Also change to argument to accept shadow_client instead of freerdp_peer
2015-06-16 00:43:17 +08:00
zihao.jiang
131f030e0e server/shadow: Decouple shadow_subsystem and subsystem implementation detail.
Make shadow_subsystem standalone so that others can implement customized shadow server with shadow library.
2015-06-14 22:20:47 +08:00
zihao.jiang
b169dfd930 server/shadow: add connect/disconnect anchor in subsystem callback
Other implementation of subsystem may want to track connect/disconnect of each client
2015-06-14 22:15:47 +08:00
zihao.jiang
8485d866d4 This is originally to add audio support. Several fixes included:
1. Introduce message queue in shadow client. No longer use subsytem->MsgPipe->out to deliver message to clients.
We used to use subsytem->MsgPipe->out for messages which need to be sent to client. But it's not correct. Only one client would get the message if multiple client exists
This problem make the fix in PR #2643 incomplete.
Introduced reference count based solution to release resource taken by the message.
Also added APIs for client message delivery.
Also fixed msg pipe in subsystem to clean resource when destroyed.
2. Discard unused StopEvent in client. We actually use quit message instead.
3. Enhance disposal of channels.
Free context for remdesk and encomsp channels. The original fix only stop the threads, but doesn't release resource.
Dispose channels earlier. The channels are built on client->vcm. Disposing channels after client->vcm is closed cause unknown behavior.
Original fix is #2644
4. Start to add audio support.
2015-06-14 21:45:52 +08:00
Armin Novak
7fc1c65165 Added subject and issuer to saved data.
When a certificate has changed, display not only the
fingerprint but also subject and issuer of old certificate.
2015-06-11 11:21:23 +02:00
Armin Novak
acc96388a5 Added certificate_get_fingerprint function to read out old one. 2015-06-11 09:14:15 +02:00
Armin Novak
2204df97f8 Added port to certificate warnings. 2015-06-10 10:59:40 +02:00
Armin Novak
f4843e8ab3 Opening file on use now. 2015-06-10 10:34:02 +02:00
Armin Novak
6192230737 Added legacy known_hosts support.
If no entry for the <host> <port> combination
was found in the v2 file and there is a legacy file
check if a matching <host> entry can be found.
In case there is a matching entry and the <fingerprint>
also matches, create a new entry in the v2 file using the
current port.
2015-06-09 16:12:41 +02:00
Armin Novak
6da4a5aaf0 Using '<host> <port> <fp>' format for known hosts. 2015-06-09 15:33:13 +02:00
tdb
c9e750214a Add Bépo Layout 2015-06-05 10:52:40 +02:00
Vic Lee
1d31f25992 h264: add encoder constant QP rate control. 2015-06-02 15:32:45 +08:00
Martin Haimberger
11716c02e0 introduced WIN32ERROR and changed dvc interface 2015-05-29 04:48:26 -07:00
Marc-André Moreau
5526348079 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-05-21 13:29:59 -04: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
Marc-André Moreau
7e1dbd505b Merge branch 'awakecoding' of https://github.com/vworkspace/FreeRDP
Conflicts:
	channels/rdpdr/server/rdpdr_main.c
2015-05-20 11:40:48 -04:00
Armin Novak
e239c10fb9 Added client bandwidth measurement result callback. 2015-05-20 16:18:55 +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