Commit Graph

28 Commits

Author SHA1 Message Date
akallabeth 075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth 74530a7931 [format strings] ensure __LINE__ is of type size_t
__LINE__ is not particularily well defined (most fall back to int).
We want to ensure that all the uses in a format string match the format
specifier, so do an explicit cast
2023-01-25 14:27:32 +01:00
Armin Novak c7868e7a3f [proxy,rdpdr] added translation layer for rdpdr versions
rdpdr filesystem has 2 different versions and mstsc uses the older one
under certain conditions.
2023-01-10 11:49:38 +01:00
Armin Novak f1e7cc0d48 [rdpdr] unify header read/write 2023-01-10 11:49:38 +01:00
Armin Novak 5a0b8fb688 [proxy,rdpdr] keep capability versions consistent 2023-01-10 11:49:38 +01:00
Armin Novak c4bbe09649 [server,proxy] rewritten Stream_CheckAndLogRequiredLengthRx
make it windows compatible
2022-12-22 15:09:03 +01:00
Armin Novak b614a2da37 [server,proxy] improve rdpdr channel logging 2022-12-22 15:09:03 +01:00
Armin Novak 37454c7420 [utils] improve rdpdr packet dump 2022-12-22 15:09:03 +01:00
Armin Novak 318b55adc1 [rdpdr] filter empty device announce 2022-12-22 15:09:03 +01:00
Armin Novak b988e8fba7 [server,proxy] fix rdpdr intercept mode 2022-12-22 15:09:03 +01:00
David Fort d59c0a49c3 proxy: fix channel shift between front and back
When some channels are filtered, some misalignement of channel ids could happen.
This patch keeps track of the back and front channel ids to correctly identify a
channel and send packets with the correct channel id.
2022-11-30 11:38:08 +01:00
Martin Fleisz fd96ed0acd proxy: Fix unicode flag parsing in proxy rdpdr client name request
Only the least significant bit is valid in the unicode flag UINT32. Some
clients send garbage data in the other bits which caused the proxy to
drop the connection which is wrong.
2022-09-08 17:39:02 +02:00
Martin Fleisz f647296122 proxy: Fix smartcard emulation with clients with active rdpdr channel 2022-08-30 14:11:56 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
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
Martin Fleisz ed53038daa proxy: Add handling of server caps when in rdpdr client running state 2022-05-19 09:23:32 +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
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 a685d90ccd Fixed integer cast warnings 2022-03-18 07:50:54 +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
Armin Novak 3bb36f4caa Fixed clang-scanbuild warnings 2022-02-22 16:15:05 +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
Armin Novak a40467b3b0 Added Stream_ConstBuffer function 2022-02-01 10:25:37 +00: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
Armin Novak 1fedd36f65 Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
Armin Novak 4e6e5be654 Added proxy intercept channels
* New configuration to intercept certain channels
* Added rdpdr intercept implementation
2022-01-11 12:34:43 +01:00