Commit Graph

3285 Commits

Author SHA1 Message Date
Joan Torres
a332db7cf5 [libfreerdp] fix endianness issues
There were some fields sent without considering endianness, making the
clients fail when parsing those fields.

Use Data_Write_XXX functions so the endiannes won't affect the byte order
and the clients will read properly the fields.
2023-08-01 07:56:16 +02:00
Richard Markiewicz
f59c98eebe [core,info] Fix rdp_info_read_string conversion check 2023-08-01 07:15:59 +02:00
Armin Novak
ef5c0e78ab [build] use define WINPR_FALLTHROUGH
with c17 compatible compilers annotate with [[fallthrough]]
2023-07-31 23:46:53 +02:00
Armin Novak
e7c2a75e1e [gateway,rpc] return FREERDP_ERROR_CONNECT_ACCESS_DENIED
unify http and rpc gateway return codes
2023-07-31 16:51:14 +02:00
Armin Novak
c656bb9d1d [core,gateway] ensure '\0' termination of http response 2023-07-31 16:51:14 +02:00
Armin Novak
de6aaded94 [core,gateway] improve http_response_print
print out all response data.
2023-07-31 08:46:57 +02:00
Armin Novak
8be9a3a5dd [core,gateway] unify http response logging 2023-07-31 08:32:43 +02:00
Armin Novak
03b78dd57b [aad] print http status response message 2023-07-28 16:42:23 +02:00
Armin Novak
cd7cb514a8 [core,gateway] unify http response logging 2023-07-28 16:42:23 +02:00
Armin Novak
0bdb62e9b5 [libfreerdp] fix integere narrow warnings 2023-07-28 15:48:32 +02:00
ehdgks0627
d04ba8d6ef Correct typos and formatting errors in format strings
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
077aff0217 [core] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
9d5e95c60b [core] fix unary minus warnings 2023-07-28 13:42:12 +02:00
Armin Novak
76169c26cd [core,caps] fix warnings 2023-07-27 20:02:43 +02:00
Armin Novak
6c01433f6a [core,smartcardlogon] fix warnings 2023-07-27 20:02:43 +02:00
Armin Novak
e61880d077 [standard] replace __FUNCTION__ with __func__ 2023-07-27 20:02:43 +02:00
Martin Fleisz
bb9c32ed72 gateway: Allow authentication using a NULL (current user) identity 2023-07-26 16:35:36 +02:00
fifthdegree
8330aa1ac4 Log aad authentication_result as hex and string 2023-07-26 09:44:17 +02:00
Armin Novak
a5ea634516 [core] fix cJSON compat
* only export used symbols, provide prototypes when required
* clean up some length checks
2023-07-24 09:54:49 +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
dev
80c7818f99 fix warning 2023-07-21 09:14:54 +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
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
5d8e21927c [warnings] fix compiler warnings 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
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
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
Armin Novak
10e010329c [client,file] add WebAuthN rdp file parsing support 2023-07-10 10:45:28 +02:00
akallabeth
e18918356f [core,rdp] set logger context 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
4c862892b4 [core,gateway] clean up websocket transport 2023-07-05 13:18:54 +02:00
akarl10
76abdcdabf [core,gateway] cleanup http response 2023-07-05 10:43:27 +02:00
akallabeth
18185e9dbc [test] disable TestConnect on windows
build directories are different and the test logic can not find the
binaries necessary to launch
2023-07-05 08:46:00 +02:00
akallabeth
d9b03b45ed [test] add executable suffix for TestConnect 2023-07-05 08:46:00 +02:00
Michael Saxl
a5a60c888b [core,transport] free wst transport after use 2023-07-04 20:33:13 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
Martin Fleisz
37f9d5b494 core: Fix flag check to enable/disable RDSTLS security
On some platforms (i.e. Mac) the BOOL type might be narrower than the
`RedirectionFlags` type leading to an overflow when just assigning the
logical AND result to the setting. This fix makes sure that the value is
correctly set to either `TRUE` or `FALSE`.
2023-07-04 09:17:05 +02:00
akallabeth
a01f3ec5ab [client,common] allow adding a named keyboard pipe
This allows starting FreeRDP clients with a named pipe that will type in
text written to the named pipe as keyboard input
2023-07-03 13:21:43 +02:00
Michael Saxl
132ce797db [core,gateway,wst] fix use after free in wst_connect 2023-07-03 10:00:12 +02:00
akallabeth
e03b6596c6 [build] fix unused but set variable warnings 2023-06-29 18:34:51 +02:00
akallabeth
851f9cce2d [core,nla] fix unused variable warning 2023-06-29 18:34:51 +02:00
akallabeth
5dcd9fcb8a [core,gateway] eliminate intermediate buffer 2023-06-29 18:34:51 +02:00
Armin Novak
66cb8c68d4 [core,nego] change nego_set_routing_token argument
Use void* instead of BYTE* as the real type is unknown and warnings can
be avoided
2023-06-29 14:46:41 +02:00
akallabeth
37d9c891b4 [core,gateway] fix return value checks 2023-06-29 14:30:09 +02:00
akallabeth
b9ec4ef60d [core,info] fix stream read check
read into variable of wrong type, fixed that.
2023-06-29 14:30:09 +02:00
Armin Novak
de7fea7347 [core,gcc] gcc_read_client_data_blocks update checks
* Update checks for stream consumed
* Update log messages, use stringified version of block type
2023-06-29 08:09:53 +02:00
akarl10
8d707adcb2 [core,gateway] make http authentication work again for websocket transport 2023-06-28 11:40:22 +02:00
akarl10
7f19fab76e [core,gateway] only encode a cookie line if there is a cookie 2023-06-28 10:47:47 +02:00