Commit Graph

15749 Commits

Author SHA1 Message Date
akallabeth
f99491c354
Fixed /gt:xxx settings (#7808)
* Disable websocket support with RPC
* Use settings getter/setter
2022-04-19 14:47:57 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth
37d0a9e2b7 Assert function pointers in proxy 2022-04-15 12:13:03 +02:00
akallabeth
eda7cf785b Fixed compilation warnings, added some asserts 2022-04-15 09:06:09 +02:00
David Fort
63d0d3e4cf proxy: rework proxy channel treatments for statefull drdynvc
The rework introduce a stateful dynamic channel treatment, so that we can take early decisions
for data packet (dropping all the current packet or pass it), but also reassemble important
packets like channel creation.
2022-04-15 09:06:09 +02:00
David Fort
f232562d8b smartcard: take in account the module path for listing smartcards
The PKCS1 module was taken only for the kerberos part.
Also make as exported the winpr_NCryptOpenStorageProviderEx function.
2022-04-15 09:06:09 +02:00
akallabeth
752ac3b479
Fix #7793: Do not expose internal input API (#7794)
* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
David Fort
a152dec687 proxy: correctly use the RemoteApp flag
The flag was forcing the remoteApp usage when set, while all the other equivalent
flags just enable the feature. This patch fixes that, so now setting RemoteApp = TRUE
just enables the front client to do remoteApps.
2022-04-12 08:05:28 +02:00
Stefan Koell
df3737b085 wfreerdp-client: make keyboard work when /parent-window is provided 2022-04-10 20:10:54 +02:00
Stefan Koell
e48d3e509a winpr: fix cache assertion before it's been created 2022-04-08 11:26:29 +02:00
Iordan Iordanov
511444a65e Switch to official OpenSSL Download location and away from github.
One of the benefits is that this adds support for building with OpenSSL 3.0 versions without breaking support for building with 1.1.1.

As part of the work, the assumption that there is an /archive/ in the download path is removed.

Furthermore, cmake modules for finding OpenSSL are updated in order to support 3.0.
2022-04-07 09:10:40 +02:00
Armin Novak
edcb8284e7 Fixed #7745: Progressive surface cleanup 2022-04-06 10:32:43 +02:00
Armin Novak
66c7228643 Fixed version mismatch in ffmpeg h264 2022-04-06 10:25:41 +02:00
Armin Novak
944e14ab82 Fixed mac peer context functions 2022-04-06 10:25:41 +02:00
akallabeth
19173a3c6b Fixed removed #endif 2022-04-06 10:25:41 +02:00
akallabeth
e647d3aa83 Additional error checks for ffmpeg h264 backend 2022-04-06 10:25:41 +02:00
akallabeth
0a9c02b1ad Always set sys->packet 2022-04-06 10:25:41 +02:00
akallabeth
f4cb7b9877 Added FFMPEG h264 asserts 2022-04-06 10:25:41 +02:00
Armin Novak
9d5e7b0d38 Fixed broken stream check 2022-04-06 08:58:32 +02:00
Armin Novak
d49f744526 Unify stream positioning on fastpath updates 2022-04-06 08:58:32 +02:00
Armin Novak
974c700977 Fixed memory leak in YUV 2022-04-06 08:58:32 +02:00
Armin Novak
24997387a4 Fixed missing capacity checks in fastpath 2022-04-06 08:58:32 +02:00
Adrian Vollmer
1adb263813 Updated doc regarding proxy URL syntax 2022-04-05 09:22:48 +02:00
Adrian Vollmer
bfea66d5e9 Set default ports for http and socks proxies 2022-04-05 09:22:48 +02:00
Adrian Vollmer
2f1003c257 Move function declaration before first use 2022-04-05 09:22:48 +02:00
Adrian Vollmer
167a29a41f Move function back to original position
This is merely done so that the diff looks nicer.
2022-04-05 09:22:48 +02:00
Adrian Vollmer
a19de01fe3 Applied requested changes
* Add `proxy_utils.h`
* Move `proxy_parse_uri()` back to `proxy.c`
* Copy function `value_to_int` to `proxy.c`
* Remove memory leak (`uri_copy`)
2022-04-05 09:22:48 +02:00
Adrian Vollmer
28923ddd75 Fixed parsing of https_proxy environment variable
A proxy URI was parsed both in the function `proxy_read_environment()` in
`libfreerdp/core/proxy.c` and in the function
`freerdp_client_settings_parse_command_line_arguments()` in
`client/common/cmdline.c`. But only the latter was taking into account
that the URI can contain a user and password, which made it impossible
to use a proxy with authentication by just using an environment
variable like `https_proxy`.

The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was
clearly not parsing the optional username and password.

This commit moves the code from `client/common/cmdline.c` to
`libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so
redundant code is avoided. This function is then called in both
instances where a proxy URI is parsed.

Some minor adjustment were made to the code, so the `WLog_INFO()`
statement at the end works in both cases, where credentials were either
provided or not. Also, some error messages were added or clarified.

If the parsing of the environment variable fails, we ignore it entirely
(with a warning) and proceed.
2022-04-05 09:22:48 +02:00
akallabeth
6c0938f752 Relaxed parser, fix a bug in LogonInfoV2 length
The length should include the padding, but even ms servers send it
without.
2022-03-31 16:15:27 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
Pascal Nowack
e68897a694 X11/cliprdr: Clear selection requests, when they become invalid
When a FormatDataRequest by xfreerdp is answered with the
CB_RESPONSE_FAIL flag, then the request was answered, but xfreerdp does
not mark it as answered, by leaving the request as pending.
This results in non-functional copy-paste actions, when copying
something from the server side, after the failed request.
A similar situation can happen, when a new FormatList is received,
while there is a pending FormatDataRequest.

Fix these situations by clearing the pending request, when a form of an
answer, either via CB_RESPONSE_FAIL flag or via new FormatList, is
received.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/7757
2022-03-29 13:39:07 +02:00
Armin Novak
eebb0c59b0 Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
Pascal Nowack
5b5582c9d5 freerdp/constants: Conform osMinorType values to documentation
The OSMINORTYPE_NATIVE_WAYLAND value does not officially exist in
[MS-RDPBCGR].
Its value also is the one for Windows RT.

Fix this situation, by introducing the os minor type
OSMINORTYPE_WINDOWS_RT with its correct value and by choosing a
different value for OSMINORTYPE_NATIVE_WAYLAND, as that value does not
exist officially.
2022-03-29 10:30:12 +02:00
Ely Ronnen
29fcfdce03 building android client modules abi based on if the native modules exists in jniLibs 2022-03-28 19:30:12 +02:00
eronnen
be07eb6f35 moving android client build to be part of aFreeRDP.apk gradle build 2022-03-28 19:30:12 +02:00
Armin Novak
037084abd5 Fix #7754 remove last newline in convert_filedescriptors_to_file_list 2022-03-28 16:21:27 +02:00
Armin Novak
22194a2ec6 Fixed missing field read. 2022-03-28 15:52:59 +02:00
Armin Novak
29b8298ff8 Fixed windows build (_snpnrintf) 2022-03-28 15:52:59 +02:00
Armin Novak
42ddb0898e Fixed NTLM flag handling
* NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED and NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED
* Problem with clients not supporting NTLMSSP_NEGOTIATE_LM_KEY
* Improve logging
2022-03-28 15:52:59 +02:00
akallabeth
47bd162065 Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00
akallabeth
905609381f Unified sspi_FreeAuthIdentity 2022-03-28 15:52:59 +02:00
akallabeth
00adf1a6a0 Fixed leak in shadow_client_logon 2022-03-28 15:52:59 +02:00
akallabeth
610f4b6bac Fixed WINPR_UNUSED/WINPR_ASSERT mixup 2022-03-28 15:52:32 +02:00
akallabeth
0ebeb51f51 Split peer_recv_callback to avoid recursive calls 2022-03-28 15:52:32 +02:00
akallabeth
d3ae821477 Improved logging, compiler warning fixes
* Improved logging in TPKT, TPDU, MCS, PER
* Proper use of rdpSettings functions
* Fixed missing return values
* Refactored rdp_server_transition_to_state
2022-03-28 15:52:32 +02:00
akallabeth
7b5ebced28 Fixed use of rdpSettings, prefer getter/setter 2022-03-28 15:52:32 +02:00
akallabeth
d22ef1786b Proper use of rdpSettings in client
* Use getter/setter
* Fix uninitialized uses
2022-03-28 15:52:32 +02:00
akallabeth
54938efc77 Removed function pointer casts 2022-03-28 15:52:32 +02:00
akallabeth
770bc14d18 Cleaned up rdpSettings use in server 2022-03-28 15:52:32 +02:00
akallabeth
1319c08bba Cleaned up use of rdpSettings in channels 2022-03-28 15:52:32 +02:00