Commit Graph

4429 Commits

Author SHA1 Message Date
Armin Novak 3905ef0b01
[client,sdl] split sdl_client_thread_run
the function can easily be split into three funcions covering a specific
part of the thread loop. Makes the whole thing less complex and easier
to read.
2024-09-18 13:01:46 +02:00
akallabeth 8ef4b2aefa
[client,SDL] move thread cleanup to own function
The cleanup code for the RDP thread of the SDL clients grew quite
complex. Move to a function to reduce complexity and make the main
thread more readable again.
2024-09-18 11:48:35 +02:00
akallabeth b7601ec755
[client,SDL] remove goto usage, replace with RAII
* use std::uniqe_ptr to clean up malloced strings
* use ScopeGuard to run cleanup code whenever the function is exited
2024-09-18 11:48:35 +02:00
akallabeth ed2c5e9a5b
[client,sdl] add scope guard
add a class wrapping a cleanup function called when the class instance
is out of scope. useful to clean up C resources in a lambda function
2024-09-18 11:48:34 +02:00
akallabeth 586f40631f
[warnings] fix shorten-64-to-32 2024-09-17 16:13:48 +02:00
David Fort 688f450fc2 SDL3 client: improve the treatment of clipboard data requests
This patch adds a success flag on clipboard data requests, so that we can react
correctly in the SDL handler. I've also made some errors non fatal like if you requests
a kind of data that doesn't exist the client should not terminateit's for that.
2024-09-17 11:37:48 +02:00
akallabeth befa4233ad
[warnings] fixed bugprone-not-null-terminated-result 2024-09-16 08:22:42 +02:00
akallabeth bb242b9a89
[return checks] fix use of WaitForSingleObject 2024-09-16 08:22:37 +02:00
akallabeth 965d231e49
[return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth cd18dea174
[return checks] fix use of unicode functions 2024-09-16 06:48:26 +02:00
akallabeth f655843260
[return checks] fix use of rdpSettings getter/setter 2024-09-16 06:48:23 +02:00
akallabeth 07ea37d1d7
[return checks] fix use of CommandLineParseArgumentsA 2024-09-16 06:48:16 +02:00
akallabeth 4c8f6383ae
[return checks] fix use of freerdp_interruptible_getc 2024-09-16 06:48:13 +02:00
akallabeth 94020c183c
[return checks] fix use of ResetEvent 2024-09-16 06:48:09 +02:00
akallabeth 7c8c14294f
[return checks] fix use of ReleaseMutex 2024-09-16 06:48:06 +02:00
akallabeth 7d67b8e204
[return checks] fix use of SetEvent 2024-09-16 06:47:58 +02:00
akallabeth 0d5bc92a2b
[warnings] fix apple iOS/macos 2024-09-15 19:47:13 +02:00
akallabeth 869bfd5e86
[client,android] mark includes SYSTEM 2024-09-15 19:47:03 +02:00
akallabeth 1bd6d70057
[warnings] fix some warnings on mac os 2024-09-15 10:06:22 +02:00
akallabeth ba41d5e532
[warnings] fix unchecked return 2024-09-15 09:08:02 +02:00
akallabeth a1cef8dd85
[warnings] silence and fix unused results 2024-09-14 21:29:28 +02:00
akallabeth 3460f64f57
[client,common] fix possible NULL dereference 2024-09-14 21:29:21 +02:00
akallabeth 16cec716e0
[strtok] replace function with strtok_s
Since strtok is not thread safe replace it with strtok_s (WinPR wrapper
around strtok_r for systems not supporting the ISO function names)
2024-09-13 21:19:17 +02:00
akallabeth 7ef9345743
Merge pull request #10549 from hardening/rcg2
core, channels: client-side remote credential guard
2024-09-13 08:24:14 +02:00
akallabeth 7ebefc505f
[warnings] fix some msbuild warnings 2024-09-12 13:32:41 +02:00
akallabeth b29c141c39
[client,cmdline] fix COMMAND_LINE_ARGUMENT_A arguments
* The project expects COMMAND_LINE_ARGUMENT_A arguments, so fix
  COMMAND_LINE_ARGUMENT macro usage. (affects windows API)
2024-09-12 13:30:10 +02:00
akallabeth 2638d9d894
[warnings] fix casts 2024-09-12 13:30:00 +02:00
akallabeth 773eed8878
[client,sdl] use auto for variable declaration 2024-09-12 13:29:53 +02:00
akallabeth e00661d338
[warnings] fix dead store warnings 2024-09-12 13:29:46 +02:00
akallabeth c9b0c9ecd5
[warnings] remove unused variables 2024-09-12 10:08:10 +02:00
akallabeth b2d58de1da
[client,X11] fix Wtautological-constant-out-of-range-compare 2024-09-12 09:08:58 +02:00
akallabeth cc6850bf21
[warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +02:00
akallabeth 8a990644c0
[warnings] fix missing NULL assert/check 2024-09-12 09:08:51 +02:00
akallabeth 2ae0c456b4
[client,sdl] fix float casts 2024-09-12 09:08:49 +02:00
akallabeth 384cd284d8
[warnings] use WINPR_CAST_CONST_AWAY
on locations that require (ugly) const to non const casts usw
WINPR_CAST_CONST_AWAY to do proper compiler specific casts to avoid
warnings
2024-09-11 23:41:50 +02:00
akallabeth 2175428df5
[client,SDL] default webview to off
The AAD webview is currently not working as expected, disable until
resolved.
2024-09-11 22:23:33 +02:00
akallabeth 993756e575
[client,sdl] fix SDL3 compilation error 2024-09-11 21:50:30 +02:00
akallabeth 06097575a4
[client,sdl] fix redundant initializer 2024-09-11 20:50:36 +02:00
akallabeth ae95b66922
[warnings] fix portability [cm]alloc size 0 2024-09-11 20:50:33 +02:00
akallabeth eec69bde0f
[client,sdl] fix c++ string find, use char overload 2024-09-11 20:50:14 +02:00
akallabeth 9fed64eb0d
[client,SDL] SdlEventUpdateTriggerGuard
Delete copy & move assingment operators
2024-09-11 20:48:39 +02:00
David Fort a4bd5ba886 core, channels: client-side remote credential guard
This patch implements the client-side part of the remote credential guard feature
as described in MS-RDPEAR. The 2 main changes are: shipping the TSRemoteGuardaCreds in
NLA, and implement the rdpear channel that allows LSASS to remote all the calls to
our client. For now it's UNIX only as the windows implementation would be implemented
in a completely different way.
To test, you may establish you ccache and then connect with (RCG enabled on the server):
	xfreerdp /remoteGuard /u:<user> /d:<domain> /v<server>

That should log you in, and in the session you should not be asked for credentials when
doing mstsc /remoteGuard /v:<other server>.
2024-09-11 17:15:11 +02:00
Armin Novak 17c209c0f9
[client,common] change /dynamic-resizing to BOOL option
Allows to use +-/ prefixes to enable/disable the option. Brought up on
matrix channel for uses with RDP files that enable the option. Now it
can be disabled by adding -dynamic-resolution on command line.
2024-09-11 11:06:21 +02:00
akallabeth edf6ab89f7
[warnings] fix dead store 2024-09-10 14:43:11 +02:00
akallabeth 189abc73f3
[client,sdl] fix missing field initializer warnings 2024-09-10 14:42:42 +02:00
akallabeth ba7465abf5
Merge pull request #10585 from akallabeth/x11-clip-cache-fix
[client,x11] fix clipboard cache
2024-09-10 14:31:25 +02:00
akallabeth fcdd03a020
[client,x11] fix clipboard cache
Use new function format_to_cache_slot to convert a clipboard format to a
valid key value for wHashTable. This avoids issues with our synthesized
CF_RAW format (value 0) which is an invalid key for wHashTable
2024-09-10 13:35:21 +02:00
akallabeth 2a641aa834
[client,sdl3] update to new API 2024-09-10 12:46:27 +02:00
akallabeth 215f798665
[client,x11] add minimize shortcut 2024-09-10 12:29:12 +02:00
akallabeth d93d9765b3
[client,sdl] add minimize shortcut 2024-09-10 12:28:36 +02:00