Armin Novak
31c1700c0c
Fixed -Wunused-variable
2022-11-21 10:12:31 +01:00
Armin Novak
8de60f9472
Fixed -Wextra-semi-stmt
2022-11-21 10:12:31 +01:00
Armin Novak
921315fdbf
Fixed -Wmissing-variable-declarations
2022-11-21 10:12:31 +01:00
Armin Novak
dacebc62a3
Use Stream_CheckAndLogRequiredLength, fix WLog TAG
...
* Log stream length requirement violations
* Use proper defines for WLog tags
2022-11-21 09:57:27 +01:00
Armin Novak
43eccb6247
[winpr,io] removed unused unimplemented functions
2022-11-21 09:16:54 +01:00
David PHAM-VAN
f2e14d68eb
Replace backslashes with underscores in printer names
2022-11-21 08:04:10 +01:00
Martin Fleisz
eb7adaec46
core: Preserve user provided credentials when being redirected
...
This PR fixes an issue where user credentials were lost when connecting
to a farm that redirects the client.
During a redirect the connection settings were overriden by the settings
stored in `rdp->originalSettings`. However these settings miss any
credentials the user provides during the connection phase, thus causing
another authentication prompt to appear.
2022-11-18 14:01:13 +01:00
Mike Gilbert
3053543068
winpr/string.h: #include <stdio.h> for snprintf
...
Fixes failure with -Werror=implicit-function-declaration.
```
FAILED: libfreerdp/CMakeFiles/freerdp.dir/core/state.c.o
/usr/bin/ccache /usr/bin/cc -DEXT_PATH=\"/usr/local/lib64/freerdp3/extensions\" -DFREERDP_EXPORTS -DNDEBUG -DWITH_OPENSSL -DWITH_VERBOSE_WINPR_ASSERT -DWITH_WAYLAND -DWITH_X11 -DWITH_XKBFILE -D_FILE_OFFSET_BITS=64 -Dfreerdp_EXPORTS -I/home/floppym/src/FreeRDP/winpr/include -I/home/floppym/src/FreeRDP/build/winpr/include -I/home/floppym/src/FreeRDP/build -I/home/floppym/src/FreeRDP/build/include -I/home/floppym/src/FreeRDP/include -Werror=implicit-function-declaration -fPIC -Wall -fvisibility=hidden -Wimplicit-function-declaration -Wredundant-decls -fno-omit-frame-pointer -O3 -DNDEBUG -flto=auto -fno-fat-lto-objects -fPIC -std=gnu11 -MD -MT libfreerdp/CMakeFiles/freerdp.dir/core/state.c.o -MF libfreerdp/CMakeFiles/freerdp.dir/core/state.c.o.d -o libfreerdp/CMakeFiles/freerdp.dir/core/state.c.o -c /home/floppym/src/FreeRDP/libfreerdp/core/state.c
In file included from /home/floppym/src/FreeRDP/libfreerdp/core/state.c:24:
/home/floppym/src/FreeRDP/libfreerdp/core/state.c: In function ‘state_run_result_string’:
/home/floppym/src/FreeRDP/winpr/include/winpr/string.h:186:19: error: implicit declaration of function ‘snprintf’ [-Werror=implicit-function-declaration]
186 | #define _snprintf snprintf
| ^~~~~~~~
/home/floppym/src/FreeRDP/libfreerdp/core/state.c:67:9: note: in expansion of macro ‘_snprintf’
67 | _snprintf(buffer, buffersize, "%s [%d]", name, status);
| ^~~~~~~~~
/home/floppym/src/FreeRDP/libfreerdp/core/state.c:25:1: note: include ‘<stdio.h>’ or provide a declaration of ‘snprintf’
24 | #include <winpr/string.h>
+++ |+#include <stdio.h>
25 |
/home/floppym/src/FreeRDP/winpr/include/winpr/string.h:186:19: warning: incompatible implicit declaration of built-in function ‘snprintf’ [-Wbuiltin-declaration-mismatch]
186 | #define _snprintf snprintf
| ^~~~~~~~
/home/floppym/src/FreeRDP/libfreerdp/core/state.c:67:9: note: in expansion of macro ‘_snprintf’
67 | _snprintf(buffer, buffersize, "%s [%d]", name, status);
| ^~~~~~~~~
/home/floppym/src/FreeRDP/winpr/include/winpr/string.h:186:19: note: include ‘<stdio.h>’ or provide a declaration of ‘snprintf’
186 | #define _snprintf snprintf
| ^~~~~~~~
/home/floppym/src/FreeRDP/libfreerdp/core/state.c:67:9: note: in expansion of macro ‘_snprintf’
67 | _snprintf(buffer, buffersize, "%s [%d]", name, status);
| ^~~~~~~~~
cc1: some warnings being treated as errors
```
Bug: https://bugs.gentoo.org/881695
2022-11-18 06:43:11 +01:00
akarl10
b1583d56c0
[rdg] implementation of http_extauth_sspi_ntlm
2022-11-16 20:28:53 +01:00
Jonas Ådahl
5b09cd57a7
uwac/input: Don't pass hotspot as offset when attaching cursor buffer
...
Passing a non-zero offset to cursor buffer and then calling
wl_pointer.set_cursor doesn't make much sense, as any offset will
immediately be reset. The protocol specifies the cursor set by
wl_pointer.set_cursor to be
> The parameters hotspot_x and hotspot_y define the position of
> the pointer surface relative to the pointer location. Its
> top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
> where (x, y) are the coordinates of the pointer location, in
> surface-local coordinates.
This leaves no room available for any previously set offsets to be kept
in response to wl_pointer.set_cursor.
2022-11-16 19:17:08 +01:00
Jonas Ådahl
b2cf6f5c2c
uwac/input: Set the right serial when setting cursor
...
The serial in wl_pointer.set_cursor must exactly match the one from
wl_pointer.enter, it should not use whatever serial for any input class
is the newest.
2022-11-16 19:17:08 +01:00
Bernhard Miklautz
3ae79bd72e
Update the security policy ( #8408 )
...
Update the security with more details on the procedure and also add GitHub's security advisory page as possibility to report a vulnerability.
2022-11-16 18:06:37 +01:00
Armin Novak
f42f8c32fd
[core,test] Fix TestConnect use after free
2022-11-16 16:03:21 +01:00
Armin Novak
5ecd62a5f7
[client,cmdline] Fix /enforce-tlsv1_2 parsing
2022-11-16 16:03:21 +01:00
Armin Novak
ca56b08719
[ci,nightly] Enable deprecated command line
2022-11-16 16:03:21 +01:00
Armin Novak
fd7a952e70
[core,transport] only return ioEvent if we use it
...
transport_get_event_handles only returns the ioEvent handle in its
list if transport_io_callback_set_event was called at least once.
2022-11-16 15:32:32 +01:00
akallabeth
d83f70bc32
[core,transport] event handle for transportIO
...
With the latest client changes the internal event loop requires a handle
to wait on. Add a new function to (re)set the newly added transport event handle.
2022-11-16 15:32:32 +01:00
akallabeth
4ccb38aa13
[core] Check return value of *_transition_to_state
...
The state transition might not be allowed, so abort if that fails.
2022-11-16 15:32:32 +01:00
Richard E. Silverman
7bbb8706ee
fix segfault on missing CSP
...
These routines:
NCryptOpenStorageProvider()
winpr_NCryptOpenStorageProviderEx
would segfault with PKCS11 support enabled, if the user did not supply
a service provider name ("CSP"); they assumed the parameter
pszProviderName would always be non-NULL, but it's NULL in that case.
2022-11-16 14:18:22 +01:00
Armin Novak
a489c69f10
[client,x11] Fixed #8397 : Clamp scaled cursor sizes
...
If a cursor is scaled, ensure the result size is at least 1x1 pixel
wide.
2022-11-16 13:47:02 +01:00
David Fort
4461144031
autodetect: prepare for multi-transport
...
Autodetect packets can be transported either in TCP TPKT packets or be contained
in multi-transport subheaders (transported on UDP). These changes do the appropriate
modifications so that in further developments we can take the transport type in account
when treating / writing these packets.
2022-11-16 11:50:46 +01:00
Richard E. Silverman
2c39bb41a8
fix use of return code from list_provider_keys()
...
list_provider_keys() returns a Boolean, true == success. But
smartcard_hw_enumerateCerts() expects the return value on success to
be ERROR_SUCCESS == 0, and so inverts success/failure.
2022-11-16 11:50:15 +01:00
Armin Novak
4ddef3e141
[capabilities] properly set RemoteFxOnly
...
The check was inverted, setting the flag properly now
2022-11-16 11:02:10 +01:00
akallabeth
663f041053
Added warning for android media codec
2022-11-15 15:42:37 +01:00
akallabeth
bc31bae2b5
[core] Unify RDP state machine
...
Up to this commit the client and server state machine handling used
different return values for state machine changes.
This is fixed with this commit:
* Use common enum return values
* Use common helper functions
2022-11-15 09:57:46 +01:00
akallabeth
8760cecbc7
[rdg] Unified rpcFallback resource cleanup
...
Since the cleanup routines are always the same unify these in
rdg_connect.
2022-11-14 09:47:13 +01:00
akarl10
355c7ec72a
rdg: Fallback to rpc if http status is not sent
...
It seems MS RDG 2016+ does not send a http status code if
something with the request or configuration is not ok. It is worth
retrying with rpc in that case
2022-11-14 09:47:13 +01:00
akallabeth
0f60ac5988
Fixed path validation in drive channel
...
Check that canonical path is a subpath of the shared directory
2022-11-14 09:28:22 +01:00
akallabeth
d71174d091
[winpr, crt] Added wcsstr implementation
2022-11-14 09:28:22 +01:00
akallabeth
cf5cb35697
[winpr, crt] Fix wcs*cmp and wcs*len checks
2022-11-14 09:28:22 +01:00
akallabeth
ed57dd37b9
Added function _wcsncmp
...
* Compare WCHAR strings up to n characters
2022-11-14 09:28:22 +01:00
akallabeth
96aef5f1af
Fixed missing stream length check in drive_file_query_directory
2022-11-14 09:28:22 +01:00
akallabeth
5b90d0bc1d
Added missing length checks in zgfx_decompress_segment
2022-11-14 09:28:22 +01:00
akallabeth
d9e687d7e1
Added missing length check in urb_control_transfer
2022-11-14 09:28:22 +01:00
akallabeth
b366ff19a5
Fixed missing input buffer length check in urbdrc
2022-11-14 09:28:22 +01:00
akallabeth
49bd22aea7
Ensure urb_create_iocompletion uses size_t for calculation
2022-11-14 09:28:22 +01:00
akallabeth
b54ca508ac
Fixed division by zero in urbdrc
2022-11-14 09:28:22 +01:00
Martin Fleisz
0629bb9c20
codec: Fix broken logging in progressive codec
2022-11-14 09:27:41 +01:00
akallabeth
d6eab34997
Updated openssl to 1.1.1s for android build
2022-11-11 11:51:53 +01:00
akallabeth
4ef72bbe14
Cleanup of client RDP state machine
...
* Use enum for most common return types
* Add success/failed check functions
* Add a function creating a string from the return value
2022-11-11 11:51:27 +01:00
akallabeth
872f52c014
[core] properly pass redirection return code
...
If a redirection packet is receivet pass the appropriate return
code through the call stack to let the client take action
2022-11-11 11:51:27 +01:00
Armin Novak
98cf410144
Fixed missing state machine rerun trigger
...
When changing the peer state return 1 to indicate a rerun is
required.
2022-11-11 11:51:27 +01:00
Armin Novak
12f0e996c0
[server] Fix state transition return value
...
When transitioning from CONNECTION_STATE_FINALIZATION_FONT_LIST to
CONNECTION_STATE_ACTIVE we must return a value > 0 so that the
state machine can properly initialize the new state.
2022-11-11 11:51:27 +01:00
Armin Novak
367ecf3c0b
Properly handle demand active state
...
The demand active state might be called when receiving data from the
client during initial connection phase or might be triggered server
side after sending a deactivate all pdu
2022-11-11 11:51:27 +01:00
Armin Novak
8210ee77db
Fixed return of rdp_client_transition_to_state
...
Use BOOL to just indicate success/failure and actually check return
of functions called.
2022-11-11 11:51:27 +01:00
Armin Novak
71c3f8e4bb
Removed blocking loop in rdp_recv_deactivate_all
...
The new state machine expects just a state change and will handle
the following transitions from there.
2022-11-11 11:51:27 +01:00
Armin Novak
ec019c8910
Fixed (TS_FONT_MAP_PDU)::mapFlags check
2022-11-11 11:51:27 +01:00
akallabeth
de8da433ec
Unified client and server synchronize PDU checks
2022-11-11 11:51:27 +01:00
akallabeth
33827cb920
Updated RDP state machine
...
* More detailed states
* Better transition checks
* No more recursive calling of state machine functions
2022-11-11 11:51:27 +01:00
akallabeth
06c2ab76e0
Remove AwaitCapabilities
2022-11-11 11:51:27 +01:00