Commit Graph

996 Commits

Author SHA1 Message Date
akallabeth
a0d38914d6 [core,aad] refactor use of cJSON
* link cJSON public to FreeRDP
* export compatibility functions for older versions of cJSON
2023-07-20 14:20:28 +02:00
akallabeth
0bc1a859e2 [client,common] add cJSON compat 2023-07-20 14:20:28 +02:00
akallabeth
a9aba69567 [client,common] fix missing link of CJSON 2023-07-20 14:20:28 +02:00
akallabeth
734117351d [aad,avc] unify callbacks to GetAccessToken
The AAD and AVD authentication mechanisms both need an OAuth2 token.
They only differ in the provided arguments, so unify the callbacks into
a single one with variable argument lists.
2023-07-20 14:20:28 +02:00
fifthdegree
d309fcd6e8 Restructure Azure AD related stuff
- Move responsibility for obtaining access tokens to clients
- Add function for getting access tokens for AVD
- Get correct server hostname during AVD setup
- Add utility function for doing http requests
2023-07-20 14:20:28 +02:00
Pascal Nowack
d7d3055b5f X11/cliprdr: Rework server to client clipboard handling
The purpose of clipboard data locking is to make the other peer
retaining the current file list until a pending paste operation is done,
even though the clipboard selection changed.
As it may be difficult to determine, when a lock is needed, imitate the
same behaviour as mstsc:
When the server side supports clipboard data locking, always attempt to
lock the file list on the server regardless of what is advertised in a
FormatList PDU.
The Lock Clipboard Data PDU can even be already sent, before the
Format List Response PDU is sent.
This is also what mstsc, does: First, lock the new (potential) file
list, then unlock the file list, when the pending paste operation is
done.
So, rework the current clipboard implementation in that direction.

Since the implementation for timeouts for old file lists is a bit hard,
for now always force unlock pending locks, when the selection changes.
However, timeouts for old file lists can still be added in the future.

The reworked clipboard handling is done with the help of three hash
tables:

1. The inode table: This hash table manages all inodes for each file.
   The keys in this table are the inodes themselves, while the values
   the files and directories and their attributes (file size, last write
   time, etc.).
2. The clipdata table: This table manages the locks for each file list.
   The keys in this table represent the clip data id and the values the
   clip data entries, which have a reference to the clip data dir, a
   directory containing the whole selection, and some helper attributes,
   like the clip data id itself.
3. The request table: Every file size or file range request is managed
   here. When a FileContentsRequest is made, its stream id with the
   respective details are added to this table. When a response is
   received, these details can then be easily looked up here.
2023-07-20 11:36:11 +02:00
akarl10
b6f18e0559 [client,aad] simplification and heap-overflow fix 2023-07-12 09:45:16 +02:00
Armin Novak
10e010329c [client,file] add WebAuthN rdp file parsing support 2023-07-10 10:45:28 +02:00
akallabeth
b033259c7a [client,common] fix rdp file key names 2023-07-05 10:47:45 +02:00
akallabeth
c74a18c622 [client,file] refactor RDP file parser
* Only print warnings for settings parsed but support not compiled in
* Use constants for key values
2023-07-04 10:04:35 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
akallabeth
2d85aa43fa [client,x11] add thread reading from named pipe
the named pipe input is converted to unicode and sent as keyboard input
2023-07-03 13:21:43 +02:00
akallabeth
a01f3ec5ab [client,common] allow adding a named keyboard pipe
This allows starting FreeRDP clients with a named pipe that will type in
text written to the named pipe as keyboard input
2023-07-03 13:21:43 +02:00
akallabeth
32b60ae438 [pointer] unify mouse pointer settings 2023-07-03 10:00:29 +02:00
akallabeth
7397fa4ae5 [client,common] fix uninitialized variable 2023-06-29 14:30:09 +02:00
akallabeth
2810a3702c [client,common] fix missing return 2023-06-28 09:45:09 +02:00
akallabeth
3f78b3c379 [build] fix unused compiler warnings 2023-06-28 09:45:09 +02:00
Michael Saxl
d55e035260 [gateway,arm] Azure Virtual Desktop Gateway support
This PR creates a new /gateway:type:arm transport.
It depends on CJSON

The arm transport is not a transport by itself but is responsible
for getting the websocket endpoint from a configuration url derived from
the configured gateway host in the rdpw file or cmdline
2023-06-27 21:15:08 +02:00
Armin Novak
93423eaf11 [client,common] move pen detection to client common 2023-06-26 11:22:32 +02:00
Armin Novak
db661798f1 [client,common] fix multitouch detection 2023-06-22 11:46:56 +02:00
Michael Saxl
44c1ec3276 [gateway,websocket] implement plain websocket transport
* factor out most websocket specific code parts into websocket.c
* create wst.c (Websocket Transport) as gateway transport implementation
* introduce GatewayUrl setting that holds the websocket url
* introduce GatewayHttpExtAuthBearer that holds the HTTP Bearer
* GatewayHttpExtAuthBearer can be used by both rdg and wst
2023-06-22 09:21:42 +02:00
Michael Saxl
9a5bedd8be cli parameter /gateway:bearer:bearertoken 2023-06-22 09:21:42 +02:00
akallabeth
1fc0d5b4b1 [winpr] remove casts for winpr_RAND calls 2023-06-21 09:57:52 +02:00
Armin Novak
b05eacb99e [build] fixed compilation warnings 2023-06-08 08:13:16 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak
8ec0b1262e [client,common] add /args-from:env
allow reading command line from a environment variable
2023-06-06 10:39:48 +02:00
akallabeth
7288680bdd [client,common] add clipboard feature mask
allow selectivly enabling or disabling clipboard direction and file
support
2023-05-25 16:26:39 +02:00
akallabeth
4ee6cfe13a [warnings] fix -Wmissing-prototypes 2023-05-24 08:24:32 +02:00
akallabeth
d4fc9d5327 [client,common] auto reconnect abort early on cancel 2023-05-23 08:51:41 +02:00
fifthdegree
449b96adb2 Use popup browser for AAD auth in SDL client
Optionally build the SDL client with Qt WebEngine to create a popup
browser for authentication to AAD. Also change the URL output on the
command line to use the "nativeclient" redirect for easier copy/pasting
of the authorization code.
2023-05-23 06:04:55 +02:00
akallabeth
9b67ef1a87 [client,common] add command line argument /args-from
This new argument allows reading all command line options from a file or
from stdin. It is a standalone argument and can not be combined with any
other.
2023-05-22 16:17:33 +02:00
akallabeth
4a006322af [winpr,clipboard] fix url unescape for file uri 2023-05-12 13:57:56 +02:00
Armin Novak
4be82bf085 [client,common] print smartcard list info
if a reader is detected, print out the number of (valid) certificates
detected. This avoids #8953 empty output if there are no valid
certificates installed on a smartcard.
2023-05-12 08:06:45 +02:00
akallabeth
c950ca375c [client,common] fix value present flag check
need to check for COMMAND_LINE_VALUE_PRESENT instad of COMMAND_LINE_ARGUMENT_PRESENT
2023-04-28 07:39:35 +02:00
akallabeth
516668d02b [fclose] ensure no invalid pointers are passed.
fclose has undefined behaviour for NULL pointers, so check for these.
2023-04-28 07:39:35 +02:00
Armin Novak
3c3c996974 [client,common] do not insist on 32bpp for rfx/gfx 2023-04-13 14:35:51 +02:00
Armin Novak
91056dc96c [client,common] fix file clipboard locking 2023-04-11 11:34:19 +02:00
akallabeth
767818e97e [client,cmdline] fix gateway option parser
Options like /gateway:type:http,no-websockets,port:1234 were not
properly parsed. The `type:http,no-websockets` must be considered as
separate options with weak dependency.
Thanks to @akarl10 for pointing out this problem.
2023-04-04 09:06:05 +02:00
Pascal Nowack
126fb7b2fc client/cliprdr_file: Fix small typo 2023-04-04 09:05:39 +02:00
akallabeth
a9b4d812b3 [client,common] improve help for /list 2023-03-27 10:28:13 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
a360f1ca8c [build] fix a few compiler warnings 2023-03-13 13:04:45 +01:00
Armin Novak
36a5c39b6b [build] fix a few warnings 2023-03-13 08:46:51 +01:00
Armin Novak
9f1fc5adaf [client,common] add /sec:aad to command line help 2023-03-10 16:38:07 +01:00
Armin Novak
233ac929ea [client,common] use interruptible getline 2023-03-10 16:38:07 +01:00
akallabeth
f5423caace [auth,aad] add freerdp* argument to callback 2023-03-10 16:38:07 +01:00
fifthdegree
4cbfa006f2 Implement support for RDS AAD
Have a working implementation of the RDS AAD enhanced security mechanism
for Azure AD logons
2023-03-10 16:38:07 +01:00
Armin Novak
6e5307c037 [client,common] fix on off option parsing
* Return an enum to allow evaluation of what option was provided
* fix /sec:nla and /sec:nla:on behaviour.
2023-03-10 11:40:08 +01:00
akallabeth
6646ff9eb0 [client,common] fix wrong arguments for file clipboard 2023-03-09 11:17:37 +01:00
Martin Fleisz
093bf79837 common:: Fix const issues with current rdp file API 2023-03-08 14:08:34 +01:00