Commit Graph

16643 Commits

Author SHA1 Message Date
akallabeth
4815b2a6ee [ci] deactivate SDL client for iOS and android 2023-01-10 17:38:00 +01:00
akallabeth
1f7bcd4a1a [client,sdl] print experimental warning 2023-01-10 17:38:00 +01:00
Armin Novak
070353bf90 added SDL2 client 2023-01-10 17:38:00 +01:00
akallabeth
82ba9ede9c [freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers 2023-01-10 17:38:00 +01:00
akallabeth
92d3e3c64a [winpr] use WINPR_ prefix for conditional includes 2023-01-10 17:38:00 +01:00
akallabeth
2479ebd816 Fixed compiler warnings 2023-01-10 17:38:00 +01:00
Armin Novak
b0c924a98e [core,cache] fixed default pointer and bitmap new
do not overwrite pointer or bitmap data in New callback
2023-01-10 17:38:00 +01:00
Armin Novak
d66b165b8e [client,common] common touch handling 2023-01-10 17:38:00 +01:00
Bernhard Miklautz
08ffe661e0 fix [client/Mac]: ninja build
Problem that caused the ninja build to fail:

* `ninja: error: build.ninja:14841: bad $-escape (literal $ must be written as $$)` - because of the way CONFIGURATION was passed
* missing build dependency betwenn client/Mac and client/Mac/cli
2023-01-10 13:26:54 +01:00
Armin Novak
c7868e7a3f [proxy,rdpdr] added translation layer for rdpdr versions
rdpdr filesystem has 2 different versions and mstsc uses the older one
under certain conditions.
2023-01-10 11:49:38 +01:00
Armin Novak
f1e7cc0d48 [rdpdr] unify header read/write 2023-01-10 11:49:38 +01:00
Armin Novak
5a0b8fb688 [proxy,rdpdr] keep capability versions consistent 2023-01-10 11:49:38 +01:00
Armin Novak
920d5ee7a1 [rdpdr] improved version handling 2023-01-10 11:49:38 +01:00
Armin Novak
58c4517700 [rdpdr] improved debug log 2023-01-10 11:49:38 +01:00
Armin Novak
d978a0dbdb [client,x11] fix rail checks
rail might be deactivated during connect, so ensure that the default
session rendering path properly checks the window pointer
2023-01-10 11:49:02 +01:00
Armin Novak
15ebdd750f [gdi] use solid fill alpha if surface has alpha 2023-01-10 11:49:02 +01:00
Armin Novak
40a309a5b9 [codec] keep alpha plane
some codecs do not support an alpha channel. keep the destination alpha
value for these as the alpha data can be set using alpha codec
separately.
2023-01-10 11:49:02 +01:00
Armin Novak
78eb6ce3a8 [codec] add flag for freerdp_image_copy
Add FREERDP_KEEP_DST_ALPHA to copy and keep the destination alpha value
2023-01-10 11:49:02 +01:00
Armin Novak
1f60ab6192 [codeql] update to API v2 2023-01-10 10:51:17 +01:00
Martin Fleisz
8d917698ea cliprdr: Fix sending of server-side PDUs
The old implementation used `Stream_GetLength` to obtain the amount of
data to send. However some PDUs (i.e. CLIPRDR_FILECONTENTS_REQUEST) are
overallocated as they contain optional data (clipDataId in this case).

We now use the position to determine the actual data written to the PDU
instead of the amount of bytes allocated, avoid sending garbage data to
the client.
2023-01-09 07:47:17 +01:00
Pascal Nowack
8d02a07974 core/server: Ignore data PDUs for DVCs that were not opened successfully
When a FreeRDP-based server tried to open a DVC, but the client answered
the DVC create request with a negative CreationStatus in the DVC create
response PDU, the server can then assume that no actual PDUs can be
received for that channel.
However, as long as the channel handle exists, FreeRDP happily forwards
any potential PDU for that handle disregarding the CreationStatus.
This is problematic, since the channel handling usually runs in its own
thread and as a result, the channel may not be destructed yet, when
receiving such stray PDU.
The PDU may be processed, even though it is not expected to be.

A situation, where this becomes problematic is the AUDIO_PLAYBACK_DVC
channel.
It may be the case, that the client answered the DVC create request
with a negative result, the server may try to close the handle and open
the static channel (RDPSND) instead, but before the server can close the
channel handle, the client actually sends PDUs regarding the format
negotiation.
In this case, the server may unintentionally already set things up,
which was not desired (the DVC is about to be closed anyway).

While this specific situation is hypothetical, since it would depend on
a malicious client, it is still possible to happen, especially since the
server implementation does not invoke the format negotiation, but
FreeRDP does it automatically, as soon as the DVC create request is
sent.

Fix this issue by discarding any data PDUs (DYNVC_DATA_FIRST and
DYNVC_DATA) of channels, that were not opened successfully.
2022-12-31 10:14:17 +01:00
David Fort
9e3bc8e3af wtsapi: add new kind of query to retrieve the open status 2022-12-27 11:02:29 +01:00
David Fort
73495a1576 core: unify function behaviour of WTSVirtualChannelQuery
With all calls when WTSVirtualChannelQuery returns FALSE that means that
no ppBuffer was allocated, that was not the case with class=WTSVirtualChannelReady.
Most callers were not aware of that, leading to leaks for example when the channel is
not available client-side, the patch changes that so that you have to call call WTSFreeMemory
only if WTSVirtualChannelQuery returned TRUE.
2022-12-27 11:02:29 +01:00
David Fort
bee2873b52 core: in connection.c use constant instead of raw value 2022-12-23 08:42:45 +01:00
David Fort
07d9baad6d crypto: export getSslMethod utility function 2022-12-23 08:42:45 +01:00
Armin Novak
e2b5f41b2c [settings] regenerated getter with updated script 2022-12-22 18:50:05 +01:00
Armin Novak
204c43a22c [tools] fixed settings getter generator
use proper default error return values by type
2022-12-22 18:50:05 +01:00
Armin Novak
22c47b7def [server,proxy] use cached channel id 2022-12-22 15:09:03 +01:00
Armin Novak
c4bbe09649 [server,proxy] rewritten Stream_CheckAndLogRequiredLengthRx
make it windows compatible
2022-12-22 15:09:03 +01:00
Armin Novak
b614a2da37 [server,proxy] improve rdpdr channel logging 2022-12-22 15:09:03 +01:00
Armin Novak
37454c7420 [utils] improve rdpdr packet dump 2022-12-22 15:09:03 +01:00
Armin Novak
833a1b2d24 [channel,rdpdr] use wLog* for server logging 2022-12-22 15:09:03 +01:00
Armin Novak
d5c5473aa9 [channel,rdpdr] use wLog* for client logging 2022-12-22 15:09:03 +01:00
Armin Novak
b917dbad32 [winpr,stream] add length check helper 2022-12-22 15:09:03 +01:00
Armin Novak
318b55adc1 [rdpdr] filter empty device announce 2022-12-22 15:09:03 +01:00
Armin Novak
b988e8fba7 [server,proxy] fix rdpdr intercept mode 2022-12-22 15:09:03 +01:00
Armin Novak
7a95c7343d [winpr,wlog] fixed noisy wlog filter 2022-12-22 15:09:03 +01:00
Armin Novak
c11f47db89 [server,shadow] do treat deactivate/reactivate
if a resolution change is required, run postconnect just as if it was
successful.
2022-12-22 15:09:03 +01:00
Armin Novak
5680a347d2 [server,proxy] fixed dump config elements 2022-12-22 15:09:03 +01:00
Armin Novak
c82ddbbcc4 [server,proxy] fixed logger namespace 2022-12-22 15:09:03 +01:00
Armin Novak
0e25f99602 Revert "[server,shadow] rdp_server_reactivate do not wait"
This reverts commit 34f44ce4a1.
2022-12-22 15:09:03 +01:00
akallabeth
9a80afeb08 [client,cmdline] add support for .rdpw file extension 2022-12-21 16:11:57 +01:00
David Fort
b283daafd7 tls: cleanup and add some methods to do handshakes asynchronously
This patch does a few cleanups to allow creating TLS and DTLS contexts.
It also introduces tls_accept_ex and tls_connect_ex that can start the SSL handshake,
and it can be finished by calling tls_handshake
2022-12-19 10:46:06 +01:00
Armin Novak
d6ab9d5f63 [server,shadow] abort connection if a resize fails
The shadow server tries to resize the client to use a compatible
resolution. If that fails, e.g. if there is another resize request after
the disconnect/reconnect sequence, abort the connection.
2022-12-19 10:38:18 +01:00
Armin Novak
34f44ce4a1 [server,shadow] rdp_server_reactivate do not wait
in rdp_server_reactivate do not wait for the server to change state, let
the peer state machine handle that.
2022-12-19 10:38:18 +01:00
akallabeth
29c92af194 [channels,rdpgfx] fixed logger setup 2022-12-18 15:14:30 +01:00
akallabeth
06c070fc4d [gfx] moved rdpgfx_get_codec_id_string to utils
the gfx related stringify helpers are nice to have outside the channel
too so that meaningful logmessages can be written.
2022-12-18 15:14:30 +01:00
akallabeth
b56bef23dd [proxy] clean up config parser
* Use constant strings to identify sections, keys, bool, ...
2022-12-18 15:14:30 +01:00
akallabeth
76bd3ee8f8 [proxy] use proxy logging macros
use proxy logging macros so we know which session a message belongs to
2022-12-18 15:14:30 +01:00
akallabeth
59e644ea2e [core] add state_run_continue function
this function is a helper to evaluate a state_run_t for repeated state
transition
2022-12-18 15:14:30 +01:00