Commit Graph

15153 Commits

Author SHA1 Message Date
Armin Novak 5a2231172c Updated copyright for proxy 2021-09-09 08:53:20 +02:00
Armin Novak 976c3c2ab9 Refactored proxy and proxy-modules:
* Split out proxy headers and moved to public API to allow external
  modules to be built.
* Split proxy into proxy library and proxy binary. The library
  can be used by other applications and provides a simple API
* Improved channel passthrough, now all channels including dynamic
  channels work.
* Extended module API to hook more events, improved module samples
* Cleaned up proxy code, removed global static variables used,
  added WINPR_ASSERT
2021-09-09 08:53:20 +02:00
Armin Novak 81a2f9e434 WINPR_ASSERT activation.c 2021-09-09 08:36:01 +02:00
Armin Novak 37ed889fd7 Removed duplicate fields from rpdRpc
* Removed rdpRpc::context
* Removed rdpRpc::settings
2021-09-09 08:36:01 +02:00
Armin Novak 17f530a866 Transport opaque 2021-09-09 08:36:01 +02:00
akallabeth 6a5070722a Removed rdpMcs::settings 2021-09-09 08:36:01 +02:00
akallabeth c2f1562a4b Removed freerdp_peer::input 2021-09-09 08:36:01 +02:00
Martin Fleisz c2819a00c9 nla: Remove incorrect check when using NLA with a NULL identity
When using NLA with a NULL identity (in AcquireCredentialsHandle) on
Windows the client sends the first NLA package with cbBuffer set to 0.
In that case the client currently incorrectly kills the connection. With
this PR the check is removed and the client correctly connects to the server.
2021-09-08 14:02:00 +02:00
Armin Novak c8571dd5fd Replaced chmod with safer fchmod
* Use fchmod so the file may not change underneath
* Add unit tests for SetFileAttributesA
* Add warning logs for unsupported flags
2021-09-06 10:11:14 +02:00
akallabeth 64403d9d40 Refactored rdpFastpath
* Structure now opaque
* Added WINPR_ASSERT where appropriate
2021-09-06 10:11:14 +02:00
akallabeth c17ba281a3 Fixed default return for missing SurfaceBits callback 2021-09-06 10:11:14 +02:00
akallabeth d7d7c45b0e Cleaned CONNECT_STATE transition function 2021-09-06 10:11:14 +02:00
akallabeth c2a7a78d94 Changed transport IO functions to take rdpContext 2021-09-06 10:11:14 +02:00
akallabeth 32b3f54bb3 Expose CONNECTION_STATE via public API
* Expose type CONNECTION_STATE
* Add getter freerdp_get_state
* Add helper freerdp_state_string
2021-09-06 10:11:14 +02:00
akallabeth ad86192ac6 Fixed TestConnect
* Due to a typo (and missing argument checks in sample-server) the
  command line for the test was invalid.
2021-09-06 10:11:14 +02:00
akallabeth af8d1e5690 Updated settings
* Generator script now WINPR_ASSERT if invalid arguments are
  supplied
* Updated settings with new generated getter/setter
2021-09-06 10:11:14 +02:00
akallabeth 83104fda9c Updated sample-server
* Refactored code to remove global static variables
* Added better error checks and WINPR_ASSERT
2021-09-06 10:11:14 +02:00
akallabeth df3d58bab3 Fixed rdp_set_io_callbacks
* Cache transport default callbacks in rdp_new
* Cache and update transport callbacks in rdp_set_io_callbacks
2021-09-06 10:11:14 +02:00
akallabeth 00ac11524e Wrapped rpdRdp:state access in getter/setter
* Only access state via getter/setter
* Better state debuggind with log messages on state transition
2021-09-06 10:11:14 +02:00
akallabeth 595a40a1e0 Transport add getter, add checks
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
2021-09-06 10:11:14 +02:00
akallabeth 732a4d3839 Ignore NULL pointer as rdpsnd_server_context_free argument 2021-09-06 10:11:14 +02:00
Armin Novak 7e7394d905 Update default android build config
Remove x86 and x86_64 to bring down pr build times
2021-09-04 18:01:30 +02:00
Armin Novak 3170f4cfd4 Update TestConnect to generate certificates
After removing the default certificates from the repo now generate
temporary ones for TestConnect
2021-09-04 18:01:30 +02:00
Armin Novak d3168a1436 Implemented #4341: Default to /network:auto
If no arguments are supplied, default to the behaviour of
/network:auto. This ensures the default experience is using the
best available graphics options.
As soon as any /network, /bpp, /rfx, /gfx, ... argument is used
only use these.
2021-09-04 18:01:30 +02:00
Armin Novak 50e9d3adf9 Implemented new AuthenticateEx callbacks. 2021-09-04 18:01:30 +02:00
Armin Novak bc9ef8327e Fixed #5382: Remove checked in test certificates
The sample servers did have checked in test certificates.
Remove them and let the user generate them when required.
2021-09-04 18:01:30 +02:00
Armin Novak fbae9ba88c Added LoadLibraryX and LoadLibraryExX
These functions take a UTF8 string and load a library with
LoadLibraryW under windows.
2021-09-03 08:29:15 +02:00
akallabeth a485306c9e
Moved global static variables to context (#7264)
xfreerdp and wlfreerdp used global static variables for multitouch input. Use fields in client context instead.
2021-09-01 09:44:11 +02:00
Armin Novak 737f5a2036 Fixed argument const correctness 2021-08-27 13:21:02 +02:00
akallabeth f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak 68f24477f6 Fixed compilation warnings on mac 2021-08-26 15:08:28 +02:00
Armin Novak 13f54fc0dd Improved fingerprint hash comparison
* Allow new hash format 11bbccdd along already supported 11:22:aa:BB
2021-08-26 09:38:12 +02:00
Armin Novak 06c883a709 Fix #7249: Endless loop in NLA 2021-08-26 09:26:34 +02:00
Armin Novak c073ca8ac8 Use MAXIMUM_WAIT_OBJECTS 2021-08-25 13:41:38 +02:00
Armin Novak 55d2363efb Removed alloca use from WaitForMultipleObjectsEx 2021-08-25 13:41:38 +02:00
Armin Novak 413dcd3c28 Fixed RDPSND_CHANNEL_NAME
RDPSND channel is special, as it has many names.
(e.g. static channel, dynamic channel and UDP one.
Use RDPSND_CHANNEL_NAME to identify the module name instad of
RDPSND_DVC_CHANNEL_NAME
2021-08-25 13:40:47 +02:00
Armin Novak 64d675a728 Fixed warnings in shadow server. 2021-08-25 10:54:24 +02:00
Armin Novak 054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak d9ea91361c Fixed freerdp_peer_free
* Close socket on free
* Added WINPR_ASSERT for all dereferenced pointers
2021-08-24 15:05:36 +02:00
akallabeth 617293e0d3
Cleanups (#7239)
* Use freerdp_settings_* for shadow and sample server

* Added freerdp_peer_set_local_and_hostname

* Code cleanups and WINPR_ASSERT

* Code cleanups

* Use CHANNEL_NAME_LEN where appropriate
* Use temporary variables in loop instead of direct array access
2021-08-24 14:09:40 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak cbb06a7c17 Fixed DsParse implementations and tests
* Implemented DsMakeSpnW
* Removed unimplemented DsCrackSpnA and DsCrackSpnW
2021-08-24 10:45:57 +02:00
Armin Novak 04ff6b8824 Implemented TestFileDeleteFile 2021-08-24 10:45:57 +02:00
Armin Novak af0ce13d8a Removed not implemented module 2021-08-24 10:45:57 +02:00
Armin Novak 5eea7fc12d WINPR_UNUSED argc, argv for unit tests 2021-08-24 10:45:57 +02:00
Armin Novak f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Hans-Peter Jansen 297f965052 Fix linking, if BUILTIN_CHANNELS switched off
If -DBUILTIN_CHANNELS=OFF is supplied to cmake, auxiliary channel modules
are built as plugins, that are loaded from $LIBDIR/freerdp as shared libs.

This patch fixes the linkage of these plugins by taking inter-channel dependencies
of this separation into account. If BUILTIN_CHANNELS=ON, these channel modules
are linked directly into the main modules. Therefore, the linking of the plugins
is conditioned accordingly.
2021-08-24 08:43:01 +02:00
Simon Nivault e42696bb2e
Some fixes for audin redirection (#7231)
* Fixed research for native PCM format

* Fixed compatibility detection for resampling

* dsp: Makes channel mix and encoding process use separated buffers

* Give FramesPerPacket to freerdp_dsp_context_reset function

* dsp: Fix DVI_ADPCM codec by respecting the required packet size

* Forbid mono channel in macos

* Fix audin command line channel option

* Disable ADPCM codec as it does not work

* Refactor valid native codec research

* Native codec research: Try different channels number

* Fix dsp channel mix

* Fix dsp resample
2021-08-23 14:49:28 +02:00
akallabeth a7cdd03809
Fixed check of orderLength for secondary orders (#7233)
The orderLength field of [MS-RDPEGDI] 2.2.2.2.1.2.1.1 might be
negative if not adjusted for the 13byes of the header.
2021-08-23 12:08:35 +02:00
Pascal Nowack 8fe794b312 winpr/clipboard: Omit last line ending for gnome-copied-files
Every uri in the x-special/gnome-copied-files mime type is separated by
a '\n' char.
However, not every line ends with '\n'. The last line MUST not include
the new line character.
2021-08-19 09:08:11 +02:00