Commit Graph

3483 Commits

Author SHA1 Message Date
akallabeth
600c7a8999 [coverity] 1543080 Dereference before null check 2024-04-12 12:41:42 +02:00
akallabeth
d18585b8cc [coverity] 1543058 Dereference before null check 2024-04-12 12:41:42 +02:00
akallabeth
f81ff8c495 [coverity] 1543141 Dereference null return value 2024-04-12 12:41:42 +02:00
akallabeth
7bf76ab67f [coverity] 1543039 Use of 32-bit time_t 2024-04-12 12:41:42 +02:00
akallabeth
f0cc78fe1a [coverity] 1047683 Unchecked return value from library 2024-04-12 12:41:42 +02:00
akallabeth
1466d70dbc [coverity] null checks 2024-04-12 09:45:09 +02:00
akallabeth
2477b37128 [warnings,types] fix BOOL assingments 2024-04-12 09:45:09 +02:00
akallabeth
5862537471 [coverity] 1543139 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
dc488c5e23 [coverity] 1543148 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
285bea320d [coverity] 1543217 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
8d9244cb3d [coverity] 1543259 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
d3eb93f2ec [coverity] 1543248 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
cf5df96c14 [coverity] 1543228 Out-of-bounds read 2024-04-12 09:45:09 +02:00
akallabeth
da85ec371c [coverity] 1543065 Resource leak 2024-04-12 09:45:09 +02:00
akallabeth
18b4c59d17 [coverity] 1543107 Resource leak 2024-04-11 12:04:07 +02:00
akallabeth
2fefc29249 [coverity] 1543164 Free of address-of expression 2024-04-11 12:04:07 +02:00
akallabeth
1affbd0655 [coverity] 1543285 Resource leak 2024-04-11 12:04:07 +02:00
akallabeth
1e325dc2de [core,settings] add missing autoreconnect option
Split settings, there was a double use for AutoReconnectEnabled.
AutoReconnectEnabled is a setting responsible for client side
autoreconnection.
AutoReconnectPacketSupported is a flag set by the server to announce
support for AutoReconnectPacket allowing fast reconnect.
2024-04-11 11:19:18 +02:00
akallabeth
0905796cd7 [core,gateway[ fix use after free 2024-04-06 09:17:17 +02:00
Ilya Shipitsin
309509808c libfreerdp/core/gateway/rdg.c: handle malloc failure 2024-04-05 09:59:12 +02:00
Armin Novak
1b7e0ffb97 [core,smartcard] allow userhint to match UPN
the username might match the UPN of the smartcard certificate. If not
fall back to compare to userHint
2024-04-04 14:05:39 +02:00
akallabeth
82dc655979 [core,gateway] improve warning for bad request
In case of E_PROXY_ORCHESTRATION_LB_SESSIONHOST_DEALLOCATED print a
warning with the message body or a generic fallback should that not be
provided.
2024-03-26 09:19:45 +01:00
akallabeth
0106d34636 [core,gatewya] fix function argument type 2024-03-20 08:39:15 +01:00
akallabeth
67eb2fce54 [core,gateway] respect abortEvent
in RDG read functions check for rdpContext::abortEvent and terminate
blocking functions if set.
2024-03-20 08:39:15 +01:00
David Fort
64b42be79e [win32,chilsession] fix path computation in 32 bits
The path was not adjusted correctly (wrong WCHAR pointer computation).
2024-03-19 10:18:28 +01:00
akallabeth
01aef769d6 [core,license] fix incompatible WCHAR pointer 2024-03-18 13:27:32 +01:00
akallabeth
70a8b185be [core,gateway] log http response status & reason
only log headers with debug level and body with trace level.
normal operation does not require this information and will flood the
console.
2024-03-12 17:07:37 +01:00
akallabeth
e31acc048e [core,client] prevent double channel close
reset clientDataCount on close.
2024-03-12 14:24:36 +01:00
akallabeth
fd46a43934 [core,update] reset invalid regions after BeginPaint
Do not touch invalid regions before BeginPaint was called. This fixes
issue #9953 as the sdl client is waiting in BeginPaint for the screen
updates of EndPaint to be actually drawn.
2024-03-11 12:15:52 +01:00
David Fort
a4cc020b75 [win32,childsession] Fix invalid pipe path with 32 bits builds
When compiled as x86 (32 bits) the path returned by WinStationCreateChildSessionTransport
is sometime missing the beginning of the pipe path.
2024-03-11 11:24:24 +01:00
David Fort
b5713c46a7 [win32] various fix for childSession
WAIT_TIMEOUT was not correctly handled in non blocking mode. Also there was a
segfault when freeing the transport (double free).
2024-03-09 11:29:08 +01: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
93eb4df524 [core,gateway] implement RDG and TSG policy
* use dynamic logger in RDG
* honor [MS-TSGU] 2.2.9.2.1.5.2 TSG_REDIRECTION_FLAGS
* honor [MS-TSGU] 2.2.10.16 HTTP_TUNNEL_AUTH_RESPONSE
  HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS flag
* add setting GatewayIgnoreRedirectionPolicy to ignore the gateway
  policy if desired
2024-03-07 16:18:41 +01:00
akallabeth
6a7c375831 [crypto,cert] add better logging of certificate read
add missing log entries for possible failures due to invalid data
received. This allows better debugging if a server sends garbage or the
crypto routines have direct RSA routine access disabled.
2024-03-07 14:59:32 +01:00
akallabeth
3b108f1839 [core,proxy] ignore empty variable
fixes #9928: ignore a defined but empty proxy environment variable
2024-03-04 14:28:38 +01:00
David Fort
aebe9742e0 [client,win32] Child session fixes
It seems like WaitFor[Single|Multiple]Object calls aren't reliable on pipes, especially
on the pipe opened for childSession access. The object can be marked as signaled even if
no data is available, making the connection laggy and unresponsive (nearly unusable in some
cases).
This patch works around that by using ReadFileEx() with overlapped instead of simple
ReadFile() and use asynchronous reads.
2024-03-01 09:46:53 +01:00
akallabeth
9a7d30d174 [clang,tidy] fix a few warnings 2024-02-27 14:15:43 +01:00
akallabeth
4b2d877bf3 [core,transport] document and fix transport_attach
* [transport_default_attach] Only attach provided socket once the
  function can no longer fail
* [transport_attach] document behaviour
2024-02-23 11:02:06 +01:00
Rubycat
3c2c6cc1d5 don't close freerdp_peer underlying socket twice
freerdp_peer->Disconnect calls BIO_free which then calls close on the
underlying file descriptor.

Then when freerdp_peer_free is called, the file descriptor is closed
again.

This is problematic if the file descriptor is recycled in between:

thread 1: freerdp_peer_new(42);
thread 1: freerdp_peer->Disconnect() closes 42
thread 2: opens a file with fd 42
thread 1: freerdp_peer_free closes 42
thread 2: uses closed file descriptor 42
2024-02-23 11:02:06 +01:00
akallabeth
acedd305d3 fixed unused-but-set-variable warnings 2024-02-22 12:31:50 +01:00
akallabeth
05e555feb7 fixed unused-variable warnings 2024-02-22 12:31:50 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
b894199f72 [winpr,collections] add generic string clone functions
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
akallabeth
d0dc657412 [build] delete unused static functions 2024-02-15 11:49:16 +01:00
akallabeth
0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 2024-02-15 11:49:16 +01:00
akallabeth
b8598728a6 [clang-tidy] clang-analyzer-core.uninitialized.Assign 2024-02-15 11:49:16 +01:00
akallabeth
81d2c1f057 [clang-tidy] clang-analyzer-core.NullDereference 2024-02-15 11:49:16 +01:00
akallabeth
f69e1fe697 [clang-tidy] readability-duplicate-include 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