Commit Graph

2300 Commits

Author SHA1 Message Date
Armin Novak
cc49a212bd Default to positive return for missing callbacks
When using +async-update, default to positive return if some
client callback is not implemented.
2020-03-10 08:59:52 +01:00
Armin Novak
d3b36ab299 Added CertificateAcceptedFingerprints to settings 2020-03-06 11:37:35 +01:00
Armin Novak
07605b0281 Consume all TPKT data reading new/upgrade license 2020-03-05 13:48:58 +01:00
Armin Novak
f1098aa17c rdp_recv_tpkt_pdu verbose debug parsing issues
Print out parsing issues found in MCS Channel 1003 parsing.
2020-03-05 13:48:58 +01:00
Armin Novak
8e55c44088 tpkt_ensure_stream_consumed now more verbose.
tpkt_ensure_stream_consumed now writes the function it was called
from to the log. This should help identify areas the check failed.
2020-03-05 13:48:58 +01:00
Armin Novak
825d63cf0c Added clarifications in freerdp_channel_process 2020-03-04 15:01:36 +01:00
Armin Novak
d7ba252cd7 Fixed arguments for peer->ReceiveChannelData 2020-03-04 14:52:19 +01:00
Armin Novak
0f729d2b2c Fixed conversion and return checks.
* Fix some missing argument checks for function pointer implementations
* Fix broken return value check for client->SendChannelData
* Updated const correctness for function pointer implementations
2020-03-04 14:44:03 +01:00
Armin Novak
9398e8e647 Fixed freerdp_channel_process length checks
Fragmented data was not handled properly.
2020-03-04 14:44:03 +01:00
Armin Novak
4ad158fac6 Added freerdp_channels_data argument checks. 2020-03-04 14:44:03 +01:00
Armin Novak
bda2731035 Fixed reading suppress output pdu
Optional rectangle must be read from PDU
2020-03-03 13:10:24 +01:00
Armin Novak
1b91c77350 Fixed shadow server with mstsc as client. 2020-03-03 12:27:19 +01:00
Armin Novak
0d1c440cf5 Consume stream data in autoconnect
TPKT checks failed due to payload data not consumed in autodetect.
2020-03-02 13:54:44 +01:00
Armin Novak
be714d2a13 Fixed tpkt header length checks.
TPKT header length and consumption of data was not consistently
checked. This adds checks after each packet processed and fixes
any inconsistencies found.
2020-03-02 11:40:35 +01:00
Armin Novak
039bb88fef Fixed warnings in capabilities.c 2020-03-02 11:40:35 +01:00
Armin Novak
171e73d797 Fixed compiler warnings in info.c 2020-03-02 11:40:35 +01:00
Armin Novak
318cb3dd47 Added tpkt header length plausibility checks. 2020-03-02 11:40:35 +01:00
Armin Novak
ce387ba04f Check length of TPKT header for plausibility. 2020-03-02 11:40:35 +01:00
Kobi Mizrachi
9417350d92 core: channels: add API to get channel name/id 2020-02-26 11:47:01 +01:00
Martin Fleisz
7ae8a158a0
Merge pull request #5707 from akallabeth/kbd_codepage
Added KeyboardCodePage option
2020-02-25 14:50:51 +01:00
Armin Novak
30275e7ac3 Added keyboard language codepages and listing option 2020-02-21 11:57:36 +01:00
Norbert Federa
a48e7f8b47 core: fix endless loops waiting for activation
There are two loops polling the transport pdu receiver in non-blocking mode
when waiting for reaching CONNECTION_STATE_ACTIVE rdp state.

In case of an invalid pdu size in the tpkt header this leaded to an endless
loop, utilizing 100% of a cpu core.

Added a sleep and limited the max loop time to the tcp ack timout value.
2020-02-20 17:51:20 +01:00
Armin Novak
ac4bb3c103 End connection before user callbacks if aborted.
If somewhere in freerdp_connect freerdp_abort_connect was called
the user callbacks Authenticate, GatewayAuthenticate and
Verify[Changed|X509]Certificate[Ex] must not be called.
2020-02-19 16:44:42 +01:00
Kobi Mizrachi
7a2eafbc3c core: server: fix a bad free in channel->queue cleanup 2020-02-10 14:29:30 +01:00
Armin Novak
89913624be FreeRDP_WTSVirtualChannelOpen unify channel new/free 2020-01-29 08:24:03 +01:00
Kobi Mizrachi
b393d59bcb server: make sure all messages in channel->queue are freed when queue is freed 2020-01-29 08:24:03 +01:00
Kobi Mizrachi
8c8e5e4239 server: proxy: show indicative log on bind failure. 2020-01-27 07:57:45 +01:00
Martin Fleisz
7ef8b10fec core: Always send CS_MULTITRANSPORT PDU to server
This PDU is required by Microsoft servers in order for bandwidth
management to work correctly. Even if we do not support multi-transport
for now we should just send a PDU with flags set to 0 to enable correct
handing of bandwidth measurement PDUs.
2020-01-23 15:16:14 +01:00
Martin Fleisz
baca062321 core: Fix and extend populate rdp file from settings
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
2020-01-22 14:18:30 +01:00
Armin Novak
9d65d9562b Fixed missing NULL set of pointer after free
Due to this double free was possible if disconnect_and_clear was
called multiple times.
2020-01-21 14:44:21 +01:00
Kobi Mizrachi
457d5e426c Revert "core: rdp: reset rdp->nla in rdp_reset"
This reverts commit 205b0fba7f.
2020-01-21 12:08:39 +01:00
Martin Fleisz
9cddb7c2be
Merge pull request #5836 from kubistika/proxy/fix_rail_and_update_issues
fixes: rail and update issues
2020-01-16 10:13:26 +01:00
Kobi Mizrachi
205b0fba7f core: rdp: reset rdp->nla in rdp_reset 2020-01-16 08:46:24 +01:00
David Fort
30d6e25def
Merge pull request #5750 from akallabeth/encomsp_auto
Encomsp automatic input control && cleanups
2020-01-15 13:56:00 +01:00
Kobi Mizrachi
d552ef9e83 server: update: made functions static 2020-01-15 12:59:06 +02:00
Kobi Mizrachi
bd5ac550c5 update: update_send_new_or_existing_window: fix signed/unsigned according to spec 2020-01-15 12:59:06 +02:00
Kobi Mizrachi
9e47fd76db server: update: call update_check_flush whenever using the reused update buffer 2020-01-15 12:59:06 +02:00
Armin Novak
4766f5204b Enabled YCoCg for planar. 2020-01-14 14:23:43 +01:00
David Fort
0cc3af2282
Merge pull request #5796 from akallabeth/rdp_10_7_large_pointers
Added RDP 10.7 large pointer support
2020-01-14 10:17:13 +01:00
Kobi Mizrachi
50d2789ebf server: fix leak in WTSCloseServer
make sure every pending message that wouldn't be handled because the
server is closing, will be free()ed as expected.
2020-01-13 13:41:44 +01:00
Armin Novak
548bec9ef2 Setting optional last error on transport close
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:35:49 +01:00
Armin Novak
895cb8f944 Added macro freerdp_set_last_error_if_not
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:34:27 +01:00
Martin Fleisz
f7f2ab302f
Merge pull request #5819 from akallabeth/last_error_informative
make Last error more informative
2020-01-09 08:47:09 +01:00
Armin Novak
105799de31 Added an error message in rdp_set_error_info
If the provided arguments are not properly set up write
an error message explaining what is wrong.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:51:00 +01:00
Martin Fleisz
4e06855826 proxy: Add received response in case of an error 2020-01-08 17:45:10 +01:00
Armin Novak
2391a1528b CONNECT_TRANSPORT_FAILED in transport_check_fds
If TRANSPORT_LAYER_CLOSED was detected in transport_check_fds
check if there is already a connection error set, otherwise
set FREERDP_ERROR_CONNECT_TRANSPORT_FAILED to allow proper
reconnect or abort handling.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:42:08 +01:00
Armin Novak
7d252cdc8e Added freerdp_set_last_error_ex function
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:39:25 +01:00
Armin Novak
c24da9e856 Fixed freerdp_settings_new error cleanup. 2020-01-07 10:49:17 +01:00
Norbert Federa
a4988f5469 transport: check if layer was set to closed
There are several code paths and error conditions where
transport->layer is correctly set to TRANSPORT_LAYER_CLOSED but
the required code for checking that state was missing.

E.g. write errors in the rdg code resulted in marking the transport
layer as closed but the transport code would indefinitely continue
to read from the receiving socket.
2019-12-27 12:37:03 +01:00
Armin Novak
323491dab1 Support for RDP protocol version 10.7
* Adds support for 10.7 protocol version
* Uses it as client default

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 09:54:11 +01:00