Commit Graph

16670 Commits

Author SHA1 Message Date
Armin Novak
9e331a6fcb [settings] add string functions for encryption 2023-01-18 09:55:06 +01:00
Armin Novak
6ff458bb34 [core] Make remote rdpSettings* context wide
The settings struct containing the data sent by the remote is now
context wide. This way it is always possible to retrieve the data.
2023-01-18 09:55:06 +01:00
Armin Novak
4b3133b138 [client,sdl] use dynamic logger instance 2023-01-18 09:32:41 +01:00
Armin Novak
a1b764019d [client,sdl] add log functions 2023-01-18 09:32:41 +01:00
Armin Novak
defa74b94b [build] continue if SDL2 is requested but not found 2023-01-18 09:32:41 +01:00
Joan Torres
e365ab443c [core,redirection] fix length field of Server Redirection Packet
The length had more bytes than the RDP_SERVER_REDIRECTION_PACKET
structure because it was counting bytes before the struct.

Using a start variable from the beginnig of sending the structure fixes
it.
2023-01-17 18:48:43 +01:00
akallabeth
9b675bd400 [core,redirection] fix target netaddresses length
include the TargetNetAddressesCount field in length
2023-01-17 12:25:31 +01:00
akallabeth
ded101119f [gateway] fix leak in rdg_send_channel_create 2023-01-17 12:25:31 +01:00
akallabeth
5104df2e22 [core,server] use redirection functions
* Modify callback to take a rdpRedirection* structure
* Use send function from redirection.c
2023-01-17 12:25:31 +01:00
akallabeth
a2c7aa8de1 [core] restructure redirection
* Expose redirection functions via public API
* Add getter/setter for public API
2023-01-17 12:25:31 +01:00
akallabeth
73105d972f [core] fix client side redirection handling
* Read previously ignored fields RedirectionGuid and TargetCertificate
* Check password requirements according to LB_PASSWORD_IS_PK_ENCRYPTED
2023-01-17 12:25:31 +01:00
akallabeth
05dab47cbd [core,settings] add missing redirection options
* RedirectionGuid
* TargetCertificate
2023-01-17 12:25:31 +01:00
Armin Novak
dd0d130f48 [crypto] make tls.h a private header
no need to uselessly export symbols that are not usable outside the
project
2023-01-14 08:50:26 +01:00
Rozhuk Ivan
a111b78530 [core] Rename TLS functions
Rename tls_ to freerdp_tls_ to avoid namespace conflicts with libtls
and probaly other tls crypto libs.
2023-01-14 08:50:26 +01:00
Armin Novak
e6a4b86fd6 [client,mac] use settings getter/setter 2023-01-14 08:09:08 +01:00
jfliu
5b44bc63e8 fix Chinese title on mac 2023-01-14 08:09:08 +01:00
amazingfate
a691b48bc0 hide password for mac client 2023-01-13 11:42:08 +01:00
akallabeth
275741cc75 [core,utils] add drdynvc stringification functions 2023-01-12 22:54:25 +01:00
akallabeth
0234204130 [proxy,channel] make tracker opaque 2023-01-12 22:54:25 +01:00
akallabeth
08a2d61d6d [proxy] fix possible NULL crash on shutdown 2023-01-12 22:54:25 +01:00
akallabeth
6d7c07076d [chanenls,drdynvc] use proper types instead of int 2023-01-12 22:54:25 +01:00
Armin Novak
8b9b2db44b [winpr] use winpr_fopen 2023-01-12 22:54:25 +01:00
Armin Novak
2d16ab5255 [winpr,sam] fix inalid NULL arguments 2023-01-11 21:37:16 +01:00
Armin Novak
39210d1efd [winpr,sam] allow empty domain in SamLookupUserW 2023-01-11 21:37:16 +01:00
Armin Novak
c2cd88d616 [nightly] enable sdl client 2023-01-11 10:03:59 +01:00
akallabeth
8041b91c12 [ci] add SDL dependencies for codeQL 2023-01-10 17:38:00 +01:00
akallabeth
7c625036ef [build] disable android SDL client build 2023-01-10 17:38:00 +01:00
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