Commit Graph

1300 Commits

Author SHA1 Message Date
akallabeth
25b5b38d32 [CMake,client] add pkg-config dependencies 2025-09-11 07:17:52 +02:00
akallabeth
142fa5b9ba [client,common] fix TestClientRdpFile 2025-09-01 09:18:50 +02:00
akallabeth
3a34545a75 [sspi,negotiate] improve /auth-pkg-list parsing
* add 'none' keyword to allow disabling all methods, selectively
  enabling by adding
* improve option description
* fix reading of ini file settings
2025-08-29 12:18:20 +02:00
akallabeth
ec9e74f5c8 [client,x11] add global config file support 2025-08-29 10:53:29 +02:00
Armin Novak
4fadd12047 fix clang-tidy warnings 2025-08-20 11:28:18 +02:00
Armin Novak
651de64c88 [client,common] use _strdup 2025-08-18 14:32:09 +02:00
Armin Novak
7b7cc538dd [client,common] fix type mismatch warnings 2025-08-18 14:05:54 +02:00
Armin Novak
9b42053f25 [client,common] fix warnings in TestClientRdpFile.c 2025-08-18 13:58:18 +02:00
Armin Novak
e47b631d40 [client,common] fix warnings in unit test 2025-08-18 11:47:50 +02:00
Armin Novak
4182472c31 [client,common] fix parsing of RdgIsKdcProxy 2025-08-18 11:17:03 +02:00
akallabeth
67fb98d268 [client,common] add settings json
Use freerdp_settings_(de)serialize to compare result of rdpFile parsing.
2025-08-18 11:17:02 +02:00
akallabeth
90f1f2bd37 [client,common] only apply defaults to unset 2025-08-18 09:47:14 +02:00
akallabeth
ad22d5fdff [client,common] add freerdp_client_populate_settings_from_rdp_file_unchecked
Sometimes it is required to have raw values from a RDP file converted to
rdpSettings without consistency modifications. Expose this with a new
function.
2025-08-18 09:47:11 +02:00
akallabeth
e8b45fb8dc [client,common] fix tenantid command line parsing 2025-08-13 22:09:27 +02:00
akallabeth
65f18983ed [warnings] Fix format string errors
* Fix casts of format string arguments (%p requires void*)
* Fix format string to match type of arguments
2025-08-13 15:09:48 +02: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
akallabeth
6284bba9f0 [clang-tidy] fix various warnings
* silence tidy warnings for public API symbols (we can't fix these for
  compatibility reasons)
* fix issues with casting
2025-08-11 14:11:40 +02:00
akallabeth
5f5485f2d3 Merge pull request #11747 from akallabeth/proxy-rpath
[cmake] add installWithRPATH
2025-08-11 12:38:47 +02:00
akallabeth
0206da4b96 [client,common] do not log success
when parsing command line options, do not log success result
2025-08-10 09:29:21 +02:00
akallabeth
12d0e491f6 [cmake] add installWithRPATH
this new CMake function installs a target to a destination and adds the
correct relative RPATH to some desired locations
2025-07-17 13:59:51 +02:00
Andreas Ziegler
9083947d9c [client,common] fix sso_mib_get_access_token return value in error case
Use FALSE instead of ERROR_INTERNAL_ERROR which could be interpreted
as "truthy" at the respective call site.
2025-07-14 13:31:04 +02:00
Armin Novak
2f617c9e39 [client,common] Unescape /gateway option values
To support escaped characters with /gateway all values are now
unuescaped before use.
2025-07-09 09:56:55 +02:00
akallabeth
4dc6091fde [client,common] fix -mouse-motion
* Move code to client/common to have it in place for all clients without
  modification
* Remember if a button was pressed and only suppress move events if no
  button is pressed.
2025-06-18 12:46:56 +02:00
akallabeth
8e38600298 [client,common] document FREERDP_ASKPASS in manpages 2025-06-18 10:16:58 +02:00
akallabeth
40c988e2da [client,common] warn on insecure argument passing
When credentials or other secrets are passed via command line print out
a warning presenting more secure alternatives
2025-06-18 10:16:56 +02:00
akallabeth
ded07fa31e [client,man] improve manpages (see #11357) 2025-06-16 11:56:06 +02:00
akallabeth
79ac927371 [client,common] change AAD url depending on request
* stdio callbacks use a redirect URL with https
* webview uses a redirect URL with ms-appx-web
2025-06-13 19:05:54 +02:00
akallabeth
17dcb86519 [client,common] fix missing AAD guards 2025-06-13 11:23:37 +02:00
akallabeth
ee6d95ab25 [warnings] fix unused warnings 2025-06-13 10:15:56 +02:00
akallabeth
6168a7bfd1 [client,common] make all azure settings configurable 2025-06-10 16:30:06 +02:00
akallabeth
8be64a066c [client,common] add documentation for /v: formats
* Add short description of default formats (url, hostname, IPv4, IPv6)
* Add pipe example
* Add socket example
2025-06-03 17:10:37 +02:00
akallabeth
52ff1cef93 [cmake] install SSO-MIB if build by ExternalProject
* Install the library if we build it as part of FreeRDP
* Format files with cmake-format
2025-06-02 19:40:44 +02:00
akallabeth
9763297d6a [client,common] (re)initialize fuse root in cliprdr_file_context_init
The clipboard might be (re)initialized multiple times, to do
initialization and deinitialization in cliprdr_file_context_init and
cliprdr_file_context_uninit.
2025-06-02 09:20:22 +02:00
akallabeth
5d088ce9c0 [client,cliprdr] refactor file clipboard 2025-05-23 15:23:28 +02:00
akallabeth
03a72a56db [client,common] lock clipboard on update 2025-05-22 14:58:21 +02:00
akallabeth
59d66237b7 [cmake] fix formatting 2025-05-22 14:58:19 +02:00
akallabeth
d7de808063 [client,common] move SSO_MIB detection to client/common 2025-05-22 10:28:05 +02:00
Armin Novak
46b5f890b6 [client,common] make sso-mib opaque
Contain details of implementation in sso_mib_new and sso_mib_free
2025-05-21 14:52:06 +02:00
Armin Novak
66a69a26e2 [client,common] initialize sso-mib late
Only initialize the sso-mib library when a token is requested for the
first time. This allows proper rdpSettings initialization in PreConnect.
2025-05-21 14:31:34 +02:00
Armin Novak
39f7972b28 [client,common] add common GetCommonAccessToken
If client-common is build with WITH_SSO_MIB inject a callback that first
tries to retrieve a token from sso-mib library and only if that fails
falls back to a client provided callback.
2025-05-21 14:00:10 +02:00
Andreas Ziegler
d3ba03bba4 refactor: move sso-mib token fetching into separate compilation unit 2025-05-21 11:44:16 +02:00
Andreas Ziegler
d6d6909d66 chore: allow fetching sso-mib as ExternalProject 2025-05-21 11:44:16 +02:00
Andreas Ziegler
8714019703 refactor: move MIBClientApp into struct rdp_client_context 2025-05-21 11:44:16 +02:00
Andreas Ziegler
5e76909881 feat: add login through MS identity broker via sso-mib interface
This change enables an alternative way of acquiring the necessary
access tokens through a local identity broker. In the current
implementation, we need to visit URLs twice and paste back the
URLs we are redirected to in order to extract authorization codes
and ultimately fetch the correct access tokens for RDP (described
here: <0>).

As an alternative, MS also provides the Microsoft Authentication
Library (MSAL) through which authentication can be handled more
or less in the background when we're using a trusted device. In
particular, we can request access tokens with the same
parameters as we're currently doing through the URL-based scheme.

As the MSAL bindings are not available for C, we implemented a
small wrapper library called sso-mib which is available at
https://github.com/siemens/sso-mib. This library translates the
high-level requests (such as acquire_token_interactive) to
respective messages on the D-Bus messaging bus which is used to
communicate with the identity broker service on Linux. The
library can be built as a .deb package and subsequently be
found through PkgConfig mechanisms in CMake.

When sso-mib is not available through pkg-config, it can also
be placed in external/, with the directory structure looking
like the following. include/ is copied from the root of the
sso-mib directory and lib/ populated with the built shared
library files and symlinks.

    external/
    ├── README
    └── sso-mib
        ├── include
        │   └── sso-mib
        │       ├── mib-account.h
        │       ├── mib-client-app.h
        │       ├── mib-exports.h
        │       ├── mib-pop-params.h
        │       ├── mib-prt.h
        │       ├── mib-prt-sso-cookie.h
        │       └── sso-mib.h
        └── lib
            ├── libsso-mib.so -> libsso-mib.so.0
            ├── libsso-mib.so.0 -> libsso-mib.so.0.4.0
            └── libsso-mib.so.0.4.0

This feature is currently hidden behind a configuration switch
and must be enabled via `-DWITH_SSO_MIB=ON`. If the connection
to the broker fails (for example, if no identity broker is
installed or running on the system), we automatically fall back
to the current scheme of copy-pasting URLs.

<0>: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/e967ebeb-9e9f-443e-857a-5208802943c2
2025-05-21 11:44:16 +02:00
akallabeth
7e11df73ba [client,common] add setting FreeRDP_MonitorOverrideFlags
use this mask to mark monitor settings set from command line.
2025-04-10 08:31:56 +02:00
akallabeth
6314e93939 [cmake] drop legacy and unused cmake_policy
Some cmake_policy settings have long been active by default (3.13 is our
current baseline) or simply unused. Due to issues with CMake 4.0 lets
drop them
2025-04-03 08:31:36 +02:00
akallabeth
4fcc44fe72 [client,cmdline] fix rdp2tcp parsing
allow command lines without this channel to succeed as well.
2025-03-20 17:45:47 +01:00
akallabeth
1f26225f69 [client,cmdline] fix rdp2tcp argument passing 2025-03-20 17:31:20 +01:00
akallabeth
14b2dc08eb [client,common] fix rdp parser
freerdp_client_file_string_reset used a return type but did not return
any value.
2025-03-18 17:32:22 +01:00
Martin Fleisz
22ace7e5c6 client: Fix population of string settings in rdp file
When calling `freerdp_client_populate_rdp_file_from_settings` you should
expect that all settings are populated to the rdp file instance. However
certain settings (i.e. cameras to redirect) where only updated if they
had a value but did not reset the setting.

This causes trouble if the file instance was used to load settings,
settings were altered and then populated back to the file instance.
2025-03-18 14:27:26 +01:00