Commit Graph

1232 Commits

Author SHA1 Message Date
David Fort
aff8fdac26 proxy: correctly handle dynamic channel fragmentation
This big patch fixes fragmentation handling in the dynamic channel. We used to
have a single state to handle fragmentation at the main dynamic channel level, but
in fact packets can be fragmented per sub channel. So we have to maintain a fragmentation
state per sub channel, this involve treating dynamic and static channels differentely
(so the size of the patch that has to implement state tracking per dynamic channels).
2022-06-17 08:38:57 +02:00
David Fort
cfe80694da proxy: add fixed user/domain/passwd
This adds a User, Domain and Password parameter in the Target section of the configuration
to specify and use a fixed backend user, domain or password (overriding the one
passed by the front user).
2022-06-15 14:05:45 +02:00
akallabeth
1cc06dc3a5 Fixed mac compilation warnings 2022-06-03 08:51:40 +02:00
akallabeth
1aacf504a1 Increase C standard to C11 2022-06-03 08:51:40 +02:00
akallabeth
a0ca2b4a6e Add LTO settings 2022-06-03 08:51:40 +02:00
akallabeth
46ccf6d0d7
Fixed RDPGFX_CAPVERSION_106 according to errata (#7924)
The [MS-RDPEGFX] spec is not really sure which value to use, so we
just announce both, the one from the spec and the one from errata.
2022-05-25 13:11:29 +02:00
akallabeth
2677ca0aaf
Always call HOOK_TYPE_CLIENT_UNINIT_CONNECT in pf_client_thread_proc (#7920) 2022-05-25 09:45:31 +02:00
Armin Novak
40f5578206 Add GFX 10.7 capsets 2022-05-24 10:08:53 +02:00
Martin Fleisz
8a06ed9299 proxy: Reset stream position before length check 2022-05-19 09:23:32 +02:00
Martin Fleisz
ed53038daa proxy: Add handling of server caps when in rdpdr client running state 2022-05-19 09:23:32 +02:00
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
Alex Wilson
9591dd1f0d shadow: convert incoming key scancode to DWORD before |= KBDEXT
KBDEXT is 0x100, so if we |= it onto a UINT8 it actually does
nothing, making us interpret all scancodes as if they're
non-extended.
2022-05-05 08:41:09 +02:00
akallabeth
0422cf9892 Fixed invalid argument types 2022-04-29 14:38:41 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
akallabeth
fb90ac280a Refactored color.h
* Remove implementations from header
* Rename functions to be FreeRDP specific
* Add deprecation define for old names
* Fixed missing includes
2022-04-28 08:40:47 +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
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
Armin Novak
944e14ab82 Fixed mac peer context functions 2022-04-06 10:25:41 +02:00
akallabeth
00adf1a6a0 Fixed leak in shadow_client_logon 2022-03-28 15:52:59 +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
14568872a9
Instance cleanup (#7738)
* Cleaned up freerdp::autodetect

* Deprecate freerdp::input

* Deprecated freerdp::update

* Deprecated freerdp::settings

* Deprecated freerdp::autodetect

* Removed rdpTransport::settings

* Deprecated freerdp_per::update|settings|autodetect

* Fixed mac client and server compilation

* Fixed windows compilation

* Added deprecation warnings

* Fixed initialization of structs.

* Fixed android build

* Fixed freerdp_client_context_new const correctness

* Fixed checks for android implementation

Replaced checks with assertions where appropriate

* Fixed checks for windows client

Replaced checks with assertions where appropriate

* Fixed proxy client pointer dereference
2022-03-23 13:18:35 +01:00
akallabeth
a685d90ccd Fixed integer cast warnings 2022-03-18 07:50:54 +01:00
akallabeth
fa59c4b705 Fixed compile warnings 2022-03-18 07:50:54 +01:00
Armin Novak
71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
Armin Novak
46e0adda93 Removed HAVE_CONFIG_H uses 2022-03-03 11:26:48 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth
64f47848c9
Proxy fixes (#7686)
* Fixed a memory leak in server side NLA auth

* Fixed #7675: Pass channel packets directly
2022-03-02 09:13:41 +01:00
Armin Novak
fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
Armin Novak
3bb36f4caa Fixed clang-scanbuild warnings 2022-02-22 16:15:05 +01:00
Armin Novak
f03059e718 Extended AINPUT API:
* Each event now has a timestamp
* Relative and absolute events are sent simultaneously
* Added a flag indicating relative events are available
2022-02-22 09:44:13 +01:00
akallabeth
7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
akallabeth
c4e14f7fd6 Added Advanced Input Channel support to sample server 2022-02-22 09:44:13 +01:00
Armin Novak
80a352366f Fixed windows shadow warnings 2022-02-18 08:38:28 +01:00
Armin Novak
21d8bab08d Fixed mingw build 2022-02-18 08:38:28 +01:00
Armin Novak
3a609fb920 Fixed mingw build warnings 2022-02-18 08:38:28 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
David Fort
46eb50df2c proxy: improve channel treatment
This PR introduces per channel context so that we can speed up operations like
retrieving the channel name from its id, or knowing what shall be done for a
packet (no config ACL recomputation at each packet).
2022-02-04 08:44:22 +00:00
Armin Novak
cefb4e1237 Use freerdp_settings_set and _strdup 2022-02-02 13:43:31 +00:00
Armin Novak
a40467b3b0 Added Stream_ConstBuffer function 2022-02-01 10:25:37 +00:00
Armin Novak
a403848e61 Fixed const/type warnings 2022-02-01 08:48:21 +01:00
akallabeth
8560803211 Removed BITMAP_UPDATE::count use 2022-01-27 10:52:02 +01:00
Armin Novak
9c7ec3888a Added deprecation to *get_fds functions 2022-01-21 08:59:09 +01:00
akallabeth
724c6f8192
Proxy cleanups (#7568)
* Fixed C++ issues with proxy context

* Added freerdp_settings_get_string_writable

* Define WITH_PROXY_EMULATE_SMARTCARD in config.h
2022-01-20 11:12:36 +01:00