Commit Graph

17490 Commits

Author SHA1 Message Date
akallabeth
80091cba6a [client,sdl] add MSVC macro for missing noexcept 2023-07-21 14:53:19 +02:00
akallabeth
33d8e8e41b [client,sdl] replace memset with c++ string iteration 2023-07-21 14:53:19 +02:00
akallabeth
830d1e17b6 [utils] improve http request logging 2023-07-21 14:53:19 +02:00
akallabeth
14d0ec9335 [core] move http status to string to utils
freerdp_http_status_string and freerdp_http_status_string_format are now
exposed as public API functions to work with http status codes
2023-07-21 14:53:19 +02:00
akallabeth
9eb80ffb19 [client,sdl] add dialog paste support 2023-07-21 14:53:19 +02:00
akallabeth
6be08815e5 [client,sdl] add OpenSans license and ttf font 2023-07-21 09:50:02 +02:00
Armin Novak
b28521d2d9 [client,sdl] use TTF_OpenFontRW
In combination with SDL_RWFromConstMem the font can be embedded without
using an intermediate file to load it from.
2023-07-21 09:50:02 +02:00
Michael Saxl
bc2caa8504 [util,http] set sni on the ssl connection 2023-07-21 09:50:02 +02:00
Armin Novak
bad77f0514 [ci] add libsdl2-ttf dependency 2023-07-21 09:50:02 +02:00
akallabeth
b259545bbb [client,sdl] update AAD/AVC callback handling 2023-07-21 09:14:54 +02:00
Armin Novak
1b79b60634 added webview scheme handler 2023-07-21 09:14:54 +02:00
akallabeth
8b0f4ca106 [client,sdl] move webview to static lib
* move to static lib aad-view
* add support for https://github.com/webview/webview (e.g. use native
  webview if available)
2023-07-21 09:14:54 +02:00
dev
80c7818f99 fix warning 2023-07-21 09:14:54 +02:00
akallabeth
c854e58392 [ci] add AAD support to nightly 2023-07-20 22:20:59 +02:00
Armin Novak
49eaf78515 [client,cmdline] add options for /list:
* /list:smartcard now allows /list:smartcard:<optional> to use different
  pkcs11 modules and settings
* /list:kbd-lang now allows /list:kbd-lang:LANG_* to filter languages
2023-07-20 22:08:27 +02:00
Armin Novak
06fd58264e [client,sdl] add a simple test for dialogs 2023-07-20 14:25:08 +02:00
Armin Novak
1a62103a08 [client,sdl] add support for win32 executables
Allow building with support for console or WinMain applications
2023-07-20 14:25:08 +02:00
Armin Novak
ac772e413d [ci] disable windows sdl client build 2023-07-20 14:25:08 +02:00
Armin Novak
3d1bb4e1d9 [client,common] allow forcing default callbacks
All clients can implement their own callbacks for
certificate/credential/smartcard/... but there is a common (default)
implementation for all clients.
with the new setting FreeRDP_UseCommonStdioCallbacks it is now possible
to force these over the client implementation provided ones
2023-07-20 14:25:08 +02:00
akallabeth
97415f0d52 [client,sdl] add user dialogs 2023-07-20 14:25:08 +02:00
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
5d8e21927c [warnings] fix compiler warnings 2023-07-20 14:20:28 +02:00
Armin Novak
15fc803981 [utils,http] add openssl 1.1 compatibility 2023-07-20 14:20:28 +02:00
akallabeth
ee078cdda4 [warnings] fix format string warnings 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
1d94ae9cc0 [utils,http] fix parser checks 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
b8c2b6abd7 channels/cliprdr: Fix writing incorrect PDU type for unlock PDUs 2023-07-20 11:36:11 +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
Pascal Nowack
4d7d136d1a core/server: Remove invalid cast
The context of wMessage is already a pointer, so the cast into UINT_PTR
is wrong here.
Additionally, casts from void pointers are superfluous.
2023-07-20 11:36:11 +02:00
Pascal Nowack
f1ed11135c server/audin: Remove wrong comment 2023-07-20 11:36:11 +02:00
2fly2
7f3390ef88 fix the issue of incorrect display of remote desktop cursor
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursor
"If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved."
2023-07-19 08:21:43 +02:00
Armin Novak
9cfde30ec0 [client,windows] implement AuthenticateEx
the newer callback provides more options (e.g. smartcard pin, ...)
2023-07-17 14:09:44 +02:00
Armin Novak
c26f356225 [winpr,ncrypt] do not link pkcs11 for dynamic detection 2023-07-17 14:04:03 +02:00
dev
a4f9702ad6 [clien,mac] fix clipboard text copy
* copy format changed
* copy length was off
2023-07-17 10:41:46 +02:00
Armin Novak
6d9d118593 [core,nego] remove AUTHZ_RESULT from nego header 2023-07-13 09:25:45 +02:00
Armin Novak
555fa2c98a [core,nla] print name of error code in log 2023-07-13 09:25:45 +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
Armin Novak
7dbf7cec68 [client,x11] fix RAILS image paste, fixes #7276 2023-07-10 10:26:55 +02:00
akallabeth
e18918356f [core,rdp] set logger context 2023-07-06 15:51:56 +02:00
akallabeth
2521d151e5 [winpr,wlog] added %{ %} formatter
* New formatter %{xxx%} which conditionally prints xxx if the context is
  not NULL
2023-07-06 15:51:56 +02:00
Martin Fleisz
a5aad5159c core: Fix issues in settings copy code
This code fixes an issue where some settings were lost when copying
settings around. I.e. the device count was first set but then calling
`freerdp_settings_set_pointer_len` caused the device count to be reset
to 0 because we passed `NULL` for the data value.

This means the count got lost upon the first copy and further copies
also resulted in losing the array data (because the count was set to 0).

This PR fixes this issue by first resetting the array and afterwards
setting the correct count value.
2023-07-06 14:26:38 +02:00
akallabeth
5d3b7ef0c2 [server,peer] server instance must support multimon 2023-07-06 09:16:51 +02:00
Bernhard Miklautz
9961570c9d [utils] use select instead of poll to read passphrases on macOS
According to the man page on macOS poll currently doesn't support
devices. This includes `/dev/tty`.
In this use case poll will returned immediately indicating that
something can be read but the following read returned `-1`
(with errno set to EAGAIN).

Using select on macOS for passphrase reading prevents this problem.
2023-07-06 08:03:53 +02:00
Martin Fleisz
c88c777482 drive: Fix double free in client drive channel 2023-07-05 14:02:31 +02:00
akallabeth
4c862892b4 [core,gateway] clean up websocket transport 2023-07-05 13:18:54 +02:00
akallabeth
b033259c7a [client,common] fix rdp file key names 2023-07-05 10:47:45 +02:00