132 Commits

Author SHA1 Message Date
Armin Novak
e5816d65ce [c23,server] replace NULL with nullptr 2026-02-26 14:34:11 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
akallabeth
b2f325251a [server] add WINPR_ATTR_NODISCARD macro 2026-02-24 11:03:46 +01:00
Armin Novak
dbef19705b [server,shadow] clean up code, check returns
* Fix return value checks
* Mark internal functions [[nodiscard]]
* Refactor x11 backend to simplify locking checks
2026-02-19 12:23:02 +01:00
akallabeth
59e4e4b388 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:41 +01:00
Armin Novak
68bbbcb2a6 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:44 +01:00
akallabeth
c3e507a82e [winpr,wlog] Replace WLog_PrintMessage calls
Prefer WLog_PrintTextMessage to have proper format string checks in
place.
2025-08-13 15:08:01 +02:00
Armin Novak
b5b258c9f4 [winpr,path] fix NULL arguments for DeleteFile 2025-06-05 11:58:47 +02:00
gpotter2
a175640025 Support non-RDP security when shadow server running as Hyper-V console 2025-05-06 22:23:40 +02:00
gpotter2
0a10fe8ce3 Add 'restricted-admin' flag to shadow server 2025-05-06 22:08:36 +02:00
akallabeth
2fb2e5f9c5 [crypto,key] add function to export PEM and create a key
* freerdp_key_generate creates a new key
* freerdp_key_get_pem exports the key as PEM
2025-04-22 12:00:40 +02:00
akallabeth
7f5a3bc352 [server,shadow] sort command line arguments
when printing the help output first sort the COMMAND_LINE_ARGUMENT_A by
argument name.
2025-04-10 09:10:36 +02:00
akallabeth
4b2d65e977 [server,shadow] add option to hide mouse cursor 2025-04-10 09:10:33 +02:00
akallabeth
87683746a5 [server,shadow] implement relative mouse support 2025-04-10 08:43:33 +02:00
akallabeth
5faf0149c2 [server,shadow] readd multi rect BitmapUpdate support
* Partially revert 1f83198bb1
* Introduce new /bitmap-compat command line option for shadow-server
* Default to send multi rectangle BitmapUpdate
2025-02-28 11:19:36 +01:00
stephanebill
4f2afa8c47 spell check with codespell 2024-11-20 16:53:40 -05:00
akallabeth
9caf38bbb6 [warnings] unify CommandLineParseCommaSeparatedValues
CommandLineParseCommaSeparatedValues does some internal hack to allow
the allocated char** to be cleaned up by free.
This enforces compiler warnings as the pointer types do not match.
Use a new free function CommandLineParserFree instead
2024-10-22 21:11:58 +02:00
akallabeth
5353bff104 [assert] use WINPR_STATIC_ASSERT 2024-10-16 19:07:07 +02:00
akallabeth
6c8c67b385 Merge pull request #10677 from akallabeth/int-narrow
Int narrow
2024-10-03 21:17:56 +02:00
akallabeth
3a2a65bbed [server,shadow] fix integer narrow 2024-10-03 18:58:56 +02:00
Armin Novak
934cf668a2 [winpr,utils] use sam file relative to config home 2024-10-02 23:27:55 +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
7d67b8e204 [return checks] fix use of SetEvent 2024-09-16 06:47:58 +02:00
akallabeth
f7726ed7b6 [server,shadow] improve command line error logging
print an error message indicating where the parsing failed.
2024-09-15 09:21:38 +02:00
akallabeth
ba41d5e532 [warnings] fix unchecked return 2024-09-15 09:08:02 +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
d757dfee24 [server,shadow] Fix RFX SurfaceBitsCommands
* Use RLGR mode from settings (might be overwritten by client)
* Only send RFX SurfaceBits if SURFCMDS_STREAM_SURFACE_BITS was set in
  capabilities
2024-07-24 21:54:36 +02:00
Armin Novak
dbfa447f67 [server,shadow] allow RFX and NSC to be disabled 2024-07-24 09:30:52 +02:00
akallabeth
23295dc386 [server,shadow] add option to disable GFX 2024-07-23 16:38:30 +02:00
akallabeth
7aa72a7507 [core,settings] unify configuration paths
* Add new function freerdp_settings_get_config_path to get current
  user configuration directory
* Add CMake option WITH_FULL_CONFIG_PATH (default OFF): If defined, use
  <appdata>/Vendor/Product as config directory, otherwise use
  <appdata>/vendor (lowercase, only if vendor equal to product)
2024-06-06 11:31:22 +02:00
akallabeth
c61fc2a0fa [server,shadow] improve shadow help and startup checks
a SAM file is required for the shadow server to work if NLA is
activated. Better document that and abort startup if no file is
available.
2024-02-26 20:59:39 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
81d2c1f057 [clang-tidy] clang-analyzer-core.NullDereference 2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
efferre79
5b731aca4d command line help should not be part of the log info 2024-01-11 09:12:57 +01:00
Armin Novak
736658a2d1 [server,shadow] fix missing set NULL after free 2023-12-15 23:21:37 +01:00
Armin Novak
9449c8c3df [server,shadow] fix opaque settings build 2023-11-24 18:19:03 +01:00
akallabeth
1f236ade7a [server] make settings opaque 2023-11-24 14:54:56 +01:00
David Fort
061148f856 [nla] initial server-side remote credential guard support
Adds support for server-side remote credential guard in NLA. When enabled that allows
the remote user to connect without shipping credentials in TSCred packets. Instead
it will send his TGT encoded with a TGS from the remote server. This way the server
is able to populate that TGT in a local credential cache without knowing the user's
password.

The patch only treats the NLA part and does not contain the associated RDPEAR channel
that allows to have the complete interaction to retrieve new access tokens.
2023-11-20 16:17:00 +01:00
Armin Novak
4803ba046c [server,shadow] implement CheckPeerAcceptRestrictions
Implement a (optional) peer limitation check for shadow server.
with the command line option /max-connections:<number> the maximum
number of simultaneous connections can be limited.
2023-06-14 17:15:21 +02:00
akallabeth
a71da162ae [server,shadow] require NLA off if -auth is requested.
* Default to authentication required for shadow server (invert previous
  default)
* force NLA off if authentication is disabled
2023-06-12 15:04:05 +02:00
Armin Novak
50ce5b834d [core,server] warn if cert not RDP security compatible 2023-03-28 17:19:03 +02:00
Armin Novak
49f44303b1 [server,shadow] clean up certificate generation 2023-03-08 13:07:20 +01:00
Armin Novak
00f8cd350b [server,shadow] abort on invalid key/certificate 2023-03-08 13:07:20 +01:00
akallabeth
ad1af95438 Removed duplicate rdp security checks 2023-02-16 10:06:17 +01:00
akallabeth
fe287e199b [server,shadow] use rdpPrivateKey and rdpCertificate 2023-02-16 10:06:17 +01:00
akallabeth
97e397e768 [server,shadow] simplify resource cleanup 2023-02-03 11:09:59 +01:00