Commit Graph

16306 Commits

Author SHA1 Message Date
Marc-André Moreau
23f66f3987 add KDC URL to internal SSPI Kerberos settings 2022-09-30 19:33:12 +02:00
Marc-André Moreau
21d28ab62d add --kdc-url command-line parameter 2022-09-30 19:33:12 +02:00
Marc-André Moreau
b324e49131 rename KerberosKdc setting to KerberosKdcUrl 2022-09-30 19:33:12 +02:00
Martin Fleisz
a42a765cc3 proxy: Fix crash due to format specifier/type mismatch in debug logging
The cmd parameter (type int) has been logged using the %s format
specifier causing an access violation.

Fixed by using get_packet_type to convert cmd to a string.
2022-09-29 16:51:54 +02:00
akallabeth
1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
Martin Fleisz
e4f476fce4 proxy: Fix handling of in drdynvc DATA_FIRST_PDU in proxy
During tests I sometimes received DATA_FIRST_PDUs that were not part of
a fragmented message but contained a complete PDU.

The documentation is not quite clear about if this is a possible
scenario or a protocol violation. However in the description of the Data
field it says:

If the sum of the DVC header size and the value specified by the Length
field is less than 1600 bytes, then the actual data length equals the
value specified by the Length field.

This hints that DATA_FIRST_PDU might also contain complete Data and does
not necessarily mean to be the first part of a fragmented PDU.
2022-09-29 14:45:30 +02:00
akallabeth
b44810418b reformatted changes 2022-09-29 09:06:28 +02:00
Stefan Koell
eb90985bf5 cleanup resources 2022-09-29 09:06:28 +02:00
Stefan Koell
a77e742e99 switch to CredReadW, more code cleanup 2022-09-29 09:06:28 +02:00
Stefan Koell
ec9542d0e1 added header file and more code cleanup 2022-09-29 09:06:28 +02:00
Stefan Koell
45578d3c63 various coding style changes according to feedback 2022-09-29 09:06:28 +02:00
Stefan Koell
f8b6154a20 Support for windows credential manager when username and password is not available
* added wf_defaults.c (also in CMakeLists.txt) which provides the capability to read credential manager entries and set username and password in the rdpSettings accordingly
* the same will be done if a gateway host is specified without credentials
* the behavior will be similar to mstsc.exe on windows
2022-09-29 09:06:28 +02:00
David Fort
c5c2e37f6d
More winpr fixes (#8255)
* Fix build with mingw

4a71cab2e7 broke wf_events.c.
The drive channel was not building because of missing definitions.

* winpr: make functions return False when not implemented
2022-09-28 16:07:04 +02:00
Joan Torres
d63f2324d1 Add support to send a ServerRedirection PDU. 2022-09-28 13:54:00 +02:00
Kang Lin
7e8bb42005 CMAKE: Fix install export FreeRDP-ShadowTargets 2022-09-27 11:06:39 +02:00
Kang Lin
71b48f61c1 WinPR::Clipboard::SyntheticFile: FIX match *.* directory bug. The FilePatternMatchA don't support *.* pattern 2022-09-27 09:27:27 +02:00
Armin Novak
ba2e5477d1 Added additional checks and fixed WCHAR usage. 2022-09-26 14:01:20 +02:00
Kang Lin
195b98a9a9 WinPR::Clipboard: Refactor synthetic file
rename posix.c to synthetic_file.c
2022-09-26 14:01:20 +02:00
akallabeth
4a71cab2e7
Replaced custom coordinate macros with windows ones (#8247)
GET_X_LPARAM and GET_Y_LPARAM correctly extract the mouse x/y
coordinates from lParam
2022-09-26 12:11:50 +02:00
David Fort
e944d8d243 winpr: improve WaitForSingleObject and WaitForMultipleObject with processes
This patch improves waiting on process handles:
* under linux we take advantage of pidfd if available, when it can be used it
allows to have one or more process in the objects that are WaitForMultipleObject-ed.
* the patch also make the code honor the timeout parameter during a WaitForSingleObject and
possibly run completion when WaitForSingleObjectEx is executed with alertable set to true
2022-09-26 12:08:00 +02:00
akallabeth
d2ab631c40
Test uri fix (#8232)
* Fixed TestUri unit test

* Make proper unit test out of the test function
* Add proper test cases

* Replace FindFirstFileA with FindFirstFileW for addins

This allows addin paths to contain unicode symbols.

* Fixed parse_uri_to_local_file definition

* Move to common clipboard.c file
* Move to header file so it can be included in test case

* Added WINPR_LOCAL for test builds

This macro exports internal functions in case of a unit test build
This way unit tests can access these without other workarounds.

* Fixed typo in function name is_dos_driver

* Cleaned up FindFirstFileW call

Use a wrapper function to convert to unicode and call the function

* Cleaned up BUILD_TESTING and EXPORT_ALL_SYMBOLS

* EXPORT_ALL_SYMBOLS now does as the name implies and exports all
  non static functions/variables from the library.
* BUILD_TESTING now only sets the defines for test code and
  activates EXPORT_ALL_SYMBOLS to allow tests to access internal
  code

* Fixed windows client warnings

* disable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
2022-09-26 11:22:02 +02:00
David Fort
ccffa8dfa2 winpr: add a function to export timer file descriptor
The equivalent exist for Events, and it happens that sometime you also need to access
the internal file descriptor associated with a timer.
2022-09-23 09:04:45 +02:00
James Fu
a04021d38b Send resize on window state change 2022-09-22 13:48:24 +02:00
akallabeth
b18ca128c8
Fixed missing encomsp check (#8238)
The channel might not have been initialized and the pointer NULL
2022-09-22 10:27:52 +02:00
Armin Novak
e6573ce60f Enable PKCS11 2022-09-22 09:56:56 +02:00
Armin Novak
fa71fcae34 Install required flathub remote and sdk automatically 2022-09-22 09:56:56 +02:00
Armin Novak
fc887196e5 Add flatpak bundle build script
* Builds the flatpak manifest (uses a temporary directory for
  intermediate files)
* Bundles the flatpak and writes it to the current directory
2022-09-22 09:56:56 +02:00
Armin Novak
16cdbf833f Updated flatpak manifest
* Use current dependencies
* Bundle OpenSSL 1.1.1 for windows  XP/vista/xp compatibility
* Build currently checked out FreeRDP instead of origin/master
2022-09-22 09:56:56 +02:00
David Fort
56204164fe core: check the kind of object for events and threads functions
This patch adds some checks for the type of object in Event and Thread functions,
this may help to find bugs where a handle with the wrong type is used as argument
of these functions.
2022-09-21 16:04:02 +02:00
David Fort
e266784b24 client: fix channel loading for rdp2tcp
The RDP2Tcp channel has no associated bool in settings for configuring the loading
of the channel (only settings->RDP2TCPArgs for the args), so let's load it outside
of the big loading loop (prevent a warning for unknown bool setting 1519).
2022-09-21 16:04:02 +02:00
garbb
24fc77a073 fix mouse button "stuck" down when dragged out of window
If user presses mouse button down within window and then moves it
outside of window before releasing, host will still see mouse
button as "stuck down" because mouse up event is not sent. So use
`SetCapture()`/`ReleaseCapture()` to capture mouse events until
button is released.
Also, since coordinates from WM_* events are signed values,
need to prevent negative values from being sent.
2022-09-21 09:59:22 +02:00
Zopolis4
2145cef543 Restrict overmatching MACH ifdef to only trigger on OSX and Mach 2022-09-21 09:09:16 +02:00
David Fort
ee9c9e7c48 Remove duplicated definitions for file constants 2022-09-21 09:03:45 +02:00
David Fort
3dcc4f4024 fix build for mingw-clang 2022-09-21 09:03:45 +02:00
Armin Novak
21ccb75812 Replaced magic numbers with definitions 2022-09-20 15:52:14 +02:00
Armin Novak
a8d4c3397c Fixed passing enum to pointer type 2022-09-20 15:52:14 +02:00
Armin Novak
eaaeb62f05 Fixed -Wcomma warning 2022-09-20 15:52:14 +02:00
Armin Novak
c018632870 Cleaned up android input event processing
* Unified event cleanup code
* Add proper support for unicode input
* Add proper return code for event process failures
2022-09-20 15:52:14 +02:00
Armin Novak
a72f101739 Fixed undefined shift behaviour
BOOL must be cast to UINT32 before shifting to avoid undefined
behaviour
2022-09-20 13:25:44 +02:00
Armin Novak
ee6317081b Improve string version extraction regex
Allow (git) tags of format 'some-important-text_v1.2.3-something_else'
Any character is now allowed, as long as there is a version of format
1.2.3 somewhere in the tag name.
2022-09-20 13:25:44 +02:00
Simon Nivault
82b58325a3 Add switch to declare printer as default or not 2022-09-20 13:25:05 +02:00
Simon Nivault
8d97215881 Enable auto default printer detection only for enum printer 2022-09-20 13:25:05 +02:00
2fly2
7e8986325c fix can not copy file after last copy
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2
afd28494a2 fix copy 0 size file on windows
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2
880a82e97b fix connection abort when copy from remote wordpad, local windows 10, open local clipboard history in settings
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-19 14:13:08 +02:00
Armin Novak
e7973d15ff Fix out of bounds reads in parse_uri_to_local_file 2022-09-19 11:06:40 +02:00
garbb
940317282c remember participantId for use with assistance set control request 2022-09-19 09:41:45 +02:00
Kang Lin
6a6e3340c7 WinPR::Clipboard: Add to convert uri to local file
URI is specified by RFC 8089: https://datatracker.ietf.org/doc/html/rfc8089

Local files:

   o  A traditional file URI for a local file with an empty authority.
      For example:

      *  "file:///path/to/file"

   o  The minimal representation of a local file with no authority field
      and an absolute path that begins with a slash "/".  For example:

      *  "file:/path/to/file"

   o  The minimal representation of a local file in a DOS- or Windows-
      based environment with no authority field and an absolute path
      that begins with a drive letter.  For example:

      *  "file:c:/path/to/file"

   o  Regular DOS or Windows file URIs with vertical line characters in
      the drive letter construct.  For example:

      *  "file:///c|/path/to/file"

      *  "file:/c|/path/to/file"

      *  "file:c|/path/to/file"
2022-09-16 11:41:43 +02:00
garbb
22bd0a43e6 add windows client assistance request control menu item 2022-09-16 08:47:06 +02:00
Armin Novak
09275bf4c7 Disable execinfo support if only header detected
Some implementations (e.g. Android with API < 33) provide the
execinfo.h header file, but do not define the backtrace functions
expected. Disable the support for execinfo backtrace in such a case
2022-09-16 08:43:19 +02:00