Commit Graph

288 Commits

Author SHA1 Message Date
akallabeth
dc76879e0b
[warnings] fix some compiler warnings
* fix compiler warnings found in a lot of places
* add missing enum type for clipboard channel
* mark deallocator for winpr image function
2024-10-30 16:12:20 +01:00
akallabeth
401f81683c
[core,settings] fake monitor in window mode
RDP requires sending monitor information to the server. If we are in
windowed mode fake that information with the windows size
2024-10-24 11:32:03 +02:00
akallabeth
47c5070805
Merge pull request #10635 from akallabeth/initialize-variables
Initialize variables
2024-09-30 16:04:20 +02:00
akallabeth
cf809e6388
[core,settings] add settings validation
after client side preconnect validate the settings.
Currently checks for some monitor layout limitations are implemented
2024-09-27 09:44:40 +02:00
akallabeth
26003e59cc
[va_list] initialize with ={0}; 2024-09-24 11:06:18 +02:00
akallabeth
82a43ef4dc
[core,client] add channel poll registration API
Add a new API that allows channels to register/unregister an
event-handle along with a callback function to be called by the RDP main
thread.
This allows background processing of channel specifics without the need
for a channel specific thread.
2024-09-24 10:10:52 +02:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
94020c183c
[return checks] fix use of ResetEvent 2024-09-16 06:48:09 +02:00
akallabeth
7d67b8e204
[return checks] fix use of SetEvent 2024-09-16 06:47:58 +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
akallabeth
5887f8a558
[warnings] suppress warnings
Some warnings can not be solved as they depend on external libraries or
limitations of the C standard.
Suppress these warnings selectively
2024-08-30 15:40:16 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
9e71b423cd
[warnings] fix various compiler warnings 2024-07-24 11:08:20 +02:00
akallabeth
e3809650bb
[core,keyboard] Prefer FreeRDP_KeyboardCodePage
if FreeRDP_KeyboardCodePage is set use the default keyboard layout for
the codepage instead of the autodetected one.
2024-06-20 10:27:50 +02:00
Armin Novak
496dcff1cf
[core,codecs] fix API function names
* deprecate codecs_new and codecs_free
* add new freerdp_client_codecs_new and freerdp_client_codecs_free
2024-05-29 14:34:18 +02:00
akallabeth
7bf76ab67f [coverity] 1543039 Use of 32-bit time_t 2024-04-12 12:41:42 +02:00
akallabeth
ef8c9e48e8 [core,utils] unify channel reloading
Add the wrapper function utils_reload_channels that unifies the channel
cleanup and channel initialization sequence required on connect,
redirect and gateway policy apply
2024-03-07 16:18:41 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
Armin Novak
adb5e5715b [cache,glyph] print warning if enabled
glyph-cache is buggy, warn if enabled.
2023-12-12 19:36:54 +01:00
akallabeth
cd4d77af86 [settings] add deprecation warnings
direct struct access to rdpSettings now produces warnings if not
explicitly deactiaved by defining FREERDP_SETTINGS_INTERNAL_USE
2023-11-24 14:54:56 +01:00
Armin Novak
1807652975 [core,helpers] add new stringify functions
* freerdp_get_logon_error_info_type_ex
* freerdp_get_logon_error_info_data_ex
2023-11-20 18:00:42 +01:00
akallabeth
0b018057b5 [core,input] use time() instead of timespec_get
android only supports the latter with API >= 29
2023-10-19 16:37:28 +02:00
Mariusz Bialonczyk
550ba7fe34 [libfreerdp] final freerdp_prevent_session_lock() implementation
Injects fake mouse movement when idle
2023-10-19 16:37:28 +02:00
Armin Novak
c91a250623 [warnings] add WINPR_FORMAT_ARG
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
akallabeth
4e824b243f [winpr] add WINPR_ATTR_FORMAT_ARG
this macro declares the function argument (pos,arg) to be a printf
style format string and enables compiler checks for that.
2023-08-25 12:56:36 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak
a433e1b761 [core,rdp] use a dynamic logger for rdpRdp 2023-05-23 05:04:55 +02:00
akallabeth
c0dc193a39 [winpr,input] use enum for keyboard types
* move type definition to WinPR as used there too.
* supported keyboard types are defined in
  [MS-RDPBCGR] 2.2.1.3.2 Client Core Data (TS_UD_CS_CORE)]
  use a enum instead of magic numbers to make code more readable.
2023-04-21 12:31:51 +02:00
akallabeth
182f15e475 [core] add logger to rdpContext
Add a dynamic logger for rdpContext
2023-04-06 12:11:46 +02:00
Armin Novak
e9bc54e8b7 [core] improve logging in freerdp_set_last_error 2023-03-13 09:36:07 +01:00
akallabeth
adce7378c3 [core,cache] make protocol caches private
most protocol internal caches do not need to be exposed. this reduces
the public API and allows us to more easily improve/change this during a
release cycle
2023-02-27 17:31:52 +01:00
akallabeth
3293d0d06a [core] add log for experimental settings
Too often experimental flags had been used without the user noticing
that. As bug reports are hard to analyze without proper information take
this approach and inform about experimental flags in use by logging
these.
2023-02-27 11:44:10 +01:00
Marc-André Moreau
3a8dce07ea expose last NLA/CredSSP SSPI error code (freerdp_get_nla_sspi_error) 2023-02-24 13:19:19 -05:00
Armin Novak
f357312584 [utils] term signal cleanup handlers
add functions to register/unregister termination cleanup handlers
2023-02-23 20:28:15 +01:00
Martin Fleisz
4b9fb8fff9 proxy: Fix NLA to TLS fallback connection
Currently the proxy's TLS fallback if an NLA connection attempt failed
is broken. There are two issues with the current code that this PR
fixes:

- freerdp_reconnect is used which requires an already established
  connection to work correctly. This is not the case since the NLA
  connectin attempt failed. This resulted in a seemingly working TLS
  connection but i.e. channels where missing/not working.
- The fallback connection attempt just altered the NLA security setting
  in the instance's settings. However these settings have been already
  modified by the NLA connection attempt so we need to create a copy of
  the original connection settings before doing the first connect.

The PR also introduces freerdp_reset_context which restores the initial
connection settings for the given instance.
2023-02-09 12:49:47 +01:00
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
Armin Novak
78b8df86bc [core] unify settings copy set/reset 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
akallabeth
d3e9210985 [core] added freerdp_is_active_state
Since client and server use different states to indicate the connection
is activated, add this convenience function to determine that
2022-12-12 12:59:32 +01:00
akallabeth
cb5c98aab0 [core,client] Add PostFinalDisconnect callback
To have more fine granied control add a new callback.
Now you have the following callback pairs:
* PreConnect <--> PostFinalDisconnect
* PostConnect <--> PostDisconnect
2022-12-09 12:30:14 +01:00
akallabeth
d83f70bc32 [core,transport] event handle for transportIO
With the latest client changes the internal event loop requires a handle
to wait on. Add a new function to (re)set the newly added transport event handle.
2022-11-16 15:32:32 +01:00
akallabeth
2dcffa62c5 Split freerdp_connect
* freerdp_connect_begin
2022-11-04 14:46:58 +01:00
akallabeth
498635a317 Added new functions to test validity of MCS
* freerdp_is_valid_mcs_create_request
* freerdp_is_valid_mcs_create_response
2022-11-04 14:46:58 +01:00
akallabeth
a29343251c Fixed invalid pointer in freerdp_connect
After rdp_client_connect the settings pointer might have changed.
Reset it from the rdpContext.
2022-10-27 09:03:54 +02:00
Armin Novak
d0ae1c8160 Moved pubSub to rdpRdp 2022-07-06 12:01:23 +02:00
Armin Novak
29af8a45b6 Fixed missing LoadChannels calls and settings on redirect 2022-06-27 14:27:12 +02:00
akallabeth
d745ba7c28 Assert function arguments in freerdp.c 2022-06-27 11:21:24 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
03e20cb541 Clean up pcap capture module 2022-06-23 07:45:55 +02:00
akallabeth
97c05cbec5 Added freerdp_disconnect_before_reconnect_context 2022-05-05 14:14:45 +02:00