Commit Graph

3775 Commits

Author SHA1 Message Date
Armin Novak
1c8bcbeb6a Added deprecation warnings to /cert-* options 2022-10-19 20:31:53 +02:00
Armin Novak
d357fa3237 Added a unified /tls: option
There are too many tls settings scattered over multiple different
switches. Add a unified option and deprecate the old ones
2022-10-19 20:31:53 +02:00
fifthdegree
eb04eb0008 Support using smartcard for gateway authentication 2022-10-19 18:55:38 +02:00
fifthdegree
e847f159a6 Try to use the smartcard key name Windows uses
Windows expects the containerName field in TSSmartCardCreds to be what
it would use for a smartcard key's name. Try to accomodate that (at
least for PIV and GIDS cards).
2022-10-19 18:55:38 +02:00
fifthdegree
9d0beaccae smartcardlogon: choose a single smartcard to use
Require a single smartcard certificate to be chosen and define a
callback to choose when more than one is available.
2022-10-19 18:55:38 +02:00
xiaopengzhou@hotmail.com
34afe6b23e Fix Format List PDU is not sent when the Clipboard Redirection Virtual Channel is initialized for the second time. (X11 client) 2022-10-18 09:14:21 +02:00
Marc-André Moreau
e3594c91dc Add UserSpecifiedServerName setting, /server-name command-line parameter 2022-10-14 17:59:57 -04:00
akallabeth
43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
Armin Novak
be9cc98c08 Refactored cmdline common
* Add settings setter where possible
* Load dynamic sound channel alongside static one
* Load clipboard channel if requested
2022-10-13 14:48:40 +02:00
akallabeth
b58dd122b2 Disable functions that require WITH_CHANNEL if not defined 2022-10-13 14:38:06 +02:00
akallabeth
dfb6e9200c Fixed build without RDPEI channel 2022-10-13 14:38:06 +02:00
akallabeth
a38d584bf1 Do not compile client functions for encomsp if channel deactivated 2022-10-13 12:12:24 +02:00
David Fort
f76c14c256 fix smartcard logon with smartcard emulation
When smartcard emulation was enabled we were dumping the key and cert to
temporary files for PKINIT call, but they were deleted before we have
actually done the PKINIT. This patch fixes it.

It also add debug statement for the listing of smartcard keys / certs.

This also fixes the listing of smartcard on certain windows configurations
were we have to force NCRYPT_SILENT when doing a NCryptOpenKey.
2022-10-13 12:03:58 +02:00
Marc-André Moreau
27a865af74 Add Negotiate SSPI authentication module filtering 2022-10-12 22:07:45 +02:00
akallabeth
bd4b261a88 Fixed #8296: Assert floatbar->handle and not xfc->window 2022-10-12 21:44:27 +02:00
akallabeth
796ceb2783 Fixed #8269: Ignore mouse/input events during floatbar events 2022-10-07 11:26:56 +02:00
akallabeth
98f9a4da19 Clean up use of memset 2022-10-07 11:26:56 +02:00
akallabeth
8671339b12 Added assertions to floatbar 2022-10-07 11:26:56 +02:00
akallabeth
60720e7706 Improved streamdump file format 2022-10-07 10:38:03 +02:00
akallabeth
ed0f258423 Use GFX small cache by default
RAILS does have some problems if this is not enabled and there is
no real benefit for not setting it, so default it
2022-10-06 16:20:47 +02:00
David Fort
3947294ffb Adjust smartcard listing
When no CSP is provided, we were listing smartcard materials by querying the
MS_SCARD_PROV_A CSP, unfortunately on some windows hosts, the smartcards aren't
listed in that CSP. So this patch does the key listing by browsing all CSPs
instead of just a default one. You can still force a CSP and you'll get keys only
from this one.

This patch also address cases where the certificate on the smartcard doesn't
have a UPN attribute, if that happen we try to get a UPN from the email address.
2022-10-06 16:06:35 +02:00
David Fort
229e047231
fix build under mingw (#8271) 2022-10-04 16:06:22 +02:00
Marc-André Moreau
cd6fcaacb4 use kerberos command-line suboptions for KDC URL 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
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
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
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
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
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
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
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
Simon Nivault
82b58325a3 Add switch to declare printer as default or not 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
garbb
940317282c remember participantId for use with assistance set control request 2022-09-19 09:41:45 +02:00
garbb
22bd0a43e6 add windows client assistance request control menu item 2022-09-16 08:47:06 +02:00
garbb
488b52405a change to c style comment 2022-09-15 10:25:35 +02:00
garbb
0413dfe7df if /auto-request-control, only request control once upon connect
if auto-request-control setting is enabled then only request control once upon connect, otherwise it will auto request control again every time server turns off control which is a bit annoying.
2022-09-15 10:25:35 +02:00
David Fort
1905524442
Channel loading (#8204)
* update .gitignore and cleanup conditionnal callback call

* client: rework channel loading

Automate the loading of channels that only depend on a given enabled setting.
2022-09-14 13:53:27 +02:00
Armin Novak
98f9c7e04b Fix #8176: Check fullscreen state and not setting
Timer based dynamic resolution updates are disabled in fullscreen
state. Check current value and not (permanent) setting
2022-09-14 08:51:54 +02:00
Armin Novak
8561b08592 Fixed gnome and mate clipboard format synthesizers 2022-09-13 14:42:33 +02:00
garbb
e06ac251d5
[windows] Disable input events on focus loss (#8199) 2022-09-13 09:34:15 +02:00
garbb
383ecc3cbd fix graphics glitch on toggle smart-sizing 2022-09-13 09:23:32 +02:00
Armin Novak
707b9348ee Unify encomsp request control code 2022-09-13 09:22:41 +02:00
garbb
8d00137cad Update wf_channels.c 2022-09-12 12:58:28 +02:00
garbb
4c2c6ed310 Update wf_client.h 2022-09-12 12:58:28 +02:00
garbb
51085a1e26 Update wf_channels.c 2022-09-12 12:58:28 +02:00
garbb
0bf644aa9a Update wf_client.h 2022-09-12 12:58:28 +02:00
garbb
5346b6628b Update wf_channels.c 2022-09-12 12:58:28 +02:00
garbb
3d12e4e8ff do not resize client window if emart sizing is enabled
If smart-sizing option is enabled in windows client and the server's desktop resolution changes, do not change the size of the client window.
This is because I would assume that if the user has enabled smart-sizing, they would intend for the window to be set to a particular size and not change.
Also, when connecting to windows 10 client, `wf_desktop_resize()` is called once just after connect and so if wfreerdp is run with `/smart-sizing:WxH` then the window will start at the size `WxH` but then immediately change to the desktop resolution of the server which makes the `/smart-sizing:WxH` parameter effectively do nothing.
2022-09-12 09:23:05 +02:00
garbb
ef5316ca1d Update wf_client.c 2022-09-12 08:40:10 +02:00
garbb
c5573371c2 Update wf_client.c 2022-09-12 08:40:10 +02:00
garbb
bb487f045a Update wf_client.c 2022-09-12 08:40:10 +02:00
garbb
9dc75441ec Update wf_gdi.h 2022-09-12 08:40:10 +02:00
garbb
c869e647fa fix scaling of update rect on windows client 2022-09-12 08:40:10 +02:00
garbb
4dbac37aed Update wf_gdi.c 2022-09-12 08:35:38 +02:00
garbb
7cfafee570 add /smart-sizing:WxH and /window-position:XxY for windows client 2022-09-12 08:35:38 +02:00
Kang Lin
98db5691e1
FIX: error checking (#8181) 2022-09-07 09:23:48 +02:00
Martin Fleisz
d8ac6e978e x11: Fix disconnects if WITH_XCURSOR is set to OFF
Fix disconnects if WITH_XCURSOR is set to OFF. In that case xf_Pointer_New currently returns FALSE causing a disconnect.
2022-09-05 14:12:47 +02:00
David Fort
4fc7a9417d
Various fixes / improvements (#8146)
* xfreerdp: fix typo in logs

* winpr: file appender, small code cleanup

* shadow-server: add an option for TLS secrets

This allows to dissect connections to the shadow server.
2022-08-22 09:42:15 +02:00
liuyuh007
95b4d3cd3d
Update cmdline.c (#8140)
ipv6 port parse error
2022-08-19 13:43:44 +02:00
2fly2
8dfadc5885
fix moving a window shrinks it 14x7 when connect to server 2019 (#8083)
* fix moving a window shrinks it 14x7 when connect to server 2019

Signed-off-by: 2fly2 <wjatchd@163.com>

* use clang-format to apply correct formatting

Signed-off-by: 2fly2 <wjatchd@163.com>

Signed-off-by: 2fly2 <wjatchd@163.com>
2022-08-16 14:22:03 +02:00
Jianfeng Liu
899424e941
xf_floatbar use XmbDrawString instead of XDrawString (#8127)
* xf_floatbar use XmbDrawString instead of XDrawString

* xf_floatbar fall back to XDrawString when fontSet is NULL

Co-authored-by: Jianfeng Liu <jfliu@zshield.net>
2022-08-16 14:21:06 +02:00
David Fort
942273e9cb
tls: add an option to dump tls secrets for wireshark decoding (#8120)
This new option /tls-secret-file:<file> allows to dump TLS secrets in a file with
the SSLKEYLOGFILE format. So this way you can setup the TLS dissector of wireshark
(Pre-Master-Secret log filename) and see the traffic in clear in wireshark.
It also add some more PFS ciphers to remove for netmon captures.
2022-08-16 10:40:32 +02:00
zengguang
e3cfe7300c
Fixed app windows destroy will do close(0) (#8073)
shmid was not initailized on creation of app window, that will be close fd = 0. everytimes in app windows destroy (Call xf_DestroyWindow ).
2022-07-15 09:18:45 +02:00
Armin Novak
b2df9207e4 Fixed #8054: multimonitor settings 2022-07-07 14:24:07 +00:00
Pascal Nowack
6492a00959 client/X11: Relieve CLIPRDR filename restriction when possible
Microsoft Windows imposes strict filename restrictions on its platform.
As RDP is developed by Microsoft and the RDS in MS Windows is typically
used as remote desktop server for the RDP protocol, these filename
restrictions are also enforced in WinPR, when copy-pasting files over
the clipboard.
However, in some connections no peer on MS Windows is involved and in
these situations, these filename restrictions are just an annoyance.

With a recent API addition in WinPR, it is now possible to override the
callback, where the filename is checked, whether it is valid.
So, use this new API to relieve the filename restriction, when the
connected remote desktop server is not on MS Windows.
2022-07-07 07:45:26 +00:00
David Véron
a3712521a8 TLS version control
* added settings for minimal and maximal TLS versions supported
* refactorisation of the force TLSv1.2 setting
2022-07-07 07:13:11 +00:00
akallabeth
2da280b8a1 Fixed compilation warnings 2022-07-04 14:59:21 +02:00
akallabeth
9a2a37786e Refactored clipboard structs 2022-07-04 14:31:08 +02:00
akallabeth
c07d240bc8 Updated pointer debug log messages 2022-07-04 14:30:49 +02:00
akallabeth
b8f3743e82 Update scaled pointer on FocusIn 2022-07-04 14:30:49 +02:00
akallabeth
2c814138cc Fixed xf_Pointer_GetCursorForCurrentScale check 2022-07-04 14:30:49 +02:00
akallabeth
51f4c374c4 Clear OpenSSL error queue before BIO_read/BIO_write 2022-07-02 16:32:50 +02:00
akallabeth
cb96e6143d Fixed -Wshadow warnings 2022-06-30 10:49:02 +02:00
akallabeth
e07233ccef Fixed float comparson 2022-06-29 18:10:33 +02:00
akallabeth
291458d2d5 Cleaned up xfreerdp error code mapping 2022-06-29 09:18:53 +02:00
akallabeth
ebf5de1d1d Preset LoadChannels function pointer 2022-06-29 09:18:53 +02:00
akallabeth
fbe1075a30 Fixed xfreerdp clipboard resource cleanup 2022-06-23 14:19:50 +02:00
akallabeth
ce2e3ab0c7 Add better explanation of FreeRDP_EnforceTLSv1_2 2022-06-23 09:18:37 +02:00
Siva Gudivada
7ce4d8b196 add a new flag to enforce tls1.2 2022-06-23 09:18:37 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
0029f8a61d Fixed windows client argument mismatch warnings 2022-06-23 07:45:55 +02:00
akallabeth
de91cec5bf Fixed const warning 2022-06-23 07:45:55 +02:00
akallabeth
90ce22283d Replaced direct settings access with getter/setter 2022-06-23 07:45:55 +02:00
akallabeth
650a275ceb Added new client callback LoadChannels and freerdp_client_load_channels
Split channel loading from PreConnect as it might be necessary to
reinitialize channels on redirect
2022-06-23 07:45:55 +02:00
Armin Novak
66e73f8b08 Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha 2022-06-21 10:28:34 +02:00
akallabeth
f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
Marc-André Moreau
161617c4a4 Implement RDP persistent bitmap cache 2022-06-08 23:37:06 +02:00
Marc-André Moreau
1d5c0be5ec Add settings to load a custom SSPI shared library module 2022-06-01 15:16:12 +02:00
akallabeth
bbf3b8deba Cleaned up xf_AppWindowFromX11Window use 2022-05-19 11:23:43 +02:00
2fly2
8f831ed324 fix RAIL abort when reconnect
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-05-19 11:23:43 +02:00
akallabeth
00d9c64507 Android auto version code 2022-05-13 10:38:26 +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
2fly2
e1e2eef4e1 fix moving a window shrinks it 14x7 when connect to server 2019
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-05-07 13:34:27 +02:00
David Fort
4ffd3e84b9 smartcard: take in account pkcs11-module in smartcard listing and print pkcs11 errors 2022-05-06 13:39:26 +02:00
dev
1c15073508 some compile fixes 2022-05-03 11:48:20 +02:00
akallabeth
3d9c972d5c
Replace direct rdpSettings access with getter/setter (#7867)
* Replace direct rdpSettings access with getter/setter

* Fixed xf_gdi_update_screen const warning
2022-05-02 10:55:44 +02:00
Armin Novak
4bbc50a4d7 Explicitly link NTDLL for windows client 2022-05-02 09:08:10 +02:00
akallabeth
575dbf523f Fixed uninitialized DeviceArray 2022-05-01 11:42:55 +02:00
akallabeth
0422cf9892 Fixed invalid argument types 2022-04-29 14:38:41 +02:00
akallabeth
6bc7f6ca88 Fixed cast-qual warnings 2022-04-28 12:37:19 +02:00
akallabeth
962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a Fixed warnings 2022-04-28 11:24:51 +02:00
akallabeth
cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
akallabeth
2dfc1ddb12 Removed obsolete trio 2022-04-28 10:49:09 +02:00
akallabeth
d68327ad74 Fixed const correctness of pPointer_Set
Pointer might need to be modified
2022-04-28 09:17:20 +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
d3e1810473 Follow up to #7832: Add NULL checks 2022-04-27 23:29:44 +02:00
2fly2
56b0ca7b3f fix restore a maximized window when it is minimized
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-04-27 18:15:56 +02:00
Armin Novak
ad20e431cc Fix #7834: Check if optional argument value is present 2022-04-27 18:00:32 +02:00
2fly2
83aaa4e575 fix x11 black RAIL window when connect to server 2019
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-04-22 10:16:49 +02:00
Armin Novak
9036b83e87 Fixed setting GatewayHostname 2022-04-20 15:24:45 +02:00
akallabeth
f99491c354
Fixed /gt:xxx settings (#7808)
* Disable websocket support with RPC
* Use settings getter/setter
2022-04-19 14:47:57 +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
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
Stefan Koell
df3737b085 wfreerdp-client: make keyboard work when /parent-window is provided 2022-04-10 20:10:54 +02:00
Stefan Koell
e48d3e509a winpr: fix cache assertion before it's been created 2022-04-08 11:26:29 +02:00
Adrian Vollmer
1adb263813 Updated doc regarding proxy URL syntax 2022-04-05 09:22:48 +02:00
Adrian Vollmer
a19de01fe3 Applied requested changes
* Add `proxy_utils.h`
* Move `proxy_parse_uri()` back to `proxy.c`
* Copy function `value_to_int` to `proxy.c`
* Remove memory leak (`uri_copy`)
2022-04-05 09:22:48 +02:00
Adrian Vollmer
28923ddd75 Fixed parsing of https_proxy environment variable
A proxy URI was parsed both in the function `proxy_read_environment()` in
`libfreerdp/core/proxy.c` and in the function
`freerdp_client_settings_parse_command_line_arguments()` in
`client/common/cmdline.c`. But only the latter was taking into account
that the URI can contain a user and password, which made it impossible
to use a proxy with authentication by just using an environment
variable like `https_proxy`.

The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was
clearly not parsing the optional username and password.

This commit moves the code from `client/common/cmdline.c` to
`libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so
redundant code is avoided. This function is then called in both
instances where a proxy URI is parsed.

Some minor adjustment were made to the code, so the `WLog_INFO()`
statement at the end works in both cases, where credentials were either
provided or not. Also, some error messages were added or clarified.

If the parsing of the environment variable fails, we ignore it entirely
(with a warning) and proceed.
2022-04-05 09:22:48 +02:00
Pascal Nowack
e68897a694 X11/cliprdr: Clear selection requests, when they become invalid
When a FormatDataRequest by xfreerdp is answered with the
CB_RESPONSE_FAIL flag, then the request was answered, but xfreerdp does
not mark it as answered, by leaving the request as pending.
This results in non-functional copy-paste actions, when copying
something from the server side, after the failed request.
A similar situation can happen, when a new FormatList is received,
while there is a pending FormatDataRequest.

Fix these situations by clearing the pending request, when a form of an
answer, either via CB_RESPONSE_FAIL flag or via new FormatList, is
received.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/7757
2022-03-29 13:39:07 +02:00
Ely Ronnen
29fcfdce03 building android client modules abi based on if the native modules exists in jniLibs 2022-03-28 19:30:12 +02:00
eronnen
be07eb6f35 moving android client build to be part of aFreeRDP.apk gradle build 2022-03-28 19:30:12 +02:00
akallabeth
d22ef1786b Proper use of rdpSettings in client
* Use getter/setter
* Fix uninitialized uses
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
Kazuki Oikawa
98f9aedd62 Supports 10bit X11 color (BGRX32 only) 2022-03-20 10:05:18 +01:00
akallabeth
fa59c4b705 Fixed compile warnings 2022-03-18 07:50:54 +01:00
Richard Markiewicz
32a1f2cc66 freerdp: fix buffer overflow in MRDPView 2022-03-18 07:50:16 +01:00
Armin Novak
9bf2fde765 Added patch from #4660 @mokyle
do not deactivate rail windows, just keep them always on
2022-03-16 21:40:34 +01:00
Martin Fleisz
5b9290fc6c client: Fix error when compiling with WITH_CHANNELS=OFF 2022-03-16 14:47:41 +01:00
akallabeth
704289ffee
Smartcard tls logon fix (#7709)
* Early return authenticate if TLS smartcard logon

* Removed obsolete SmartcardPin and unified AuthenticateEx calls

* Remove password-is-pin from command line

The setting is implied by smartcard-logon and only of interest in
server side code, so the setting is useless

* Rework AUTH_SMARTCARD_PIN

Just prompt for PIN and not user/domain if this is requested.

* Fixed a memory leak in nla.c

* Align credentail prompt

* Handle AUTH_NLA & smartcard, just ask for PIN

* Added assertions, removed duplicate password prompt check

* Move smartcard logon after credential prompt
2022-03-09 09:09:53 +01:00
Armin Novak
71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
Armin Novak
25e8a362b1 Abort autoreconnect if a user cancel action was triggered. 2022-03-07 15:13:34 +01:00
akallabeth
3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak
c3ac5b7b89 Fixed mac warning 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
121e736694 Use _vsnwprintf instead of vswprintf_s 2022-02-28 16:49:18 +01:00
Armin Novak
7b65677b65 Improved command line help printing 2022-02-24 14:48:46 +01:00
Armin Novak
6a2524d2a8 Cleaned up imports 2022-02-24 12:06:06 +01:00
Armin Novak
6dfd490351 Fixed GetStringUTFChars return value type 2022-02-24 12:06:06 +01:00
David Fort
34c5b65064 Move some options to /kerberos block 2022-02-24 08:52:25 +01:00
Armin Novak
8ff70baf53 Const correct parseSubOptions
* Function static
* Arguments const where applicable
2022-02-24 08:52:25 +01:00
Armin Novak
150674f341 Moved headers to appropriate places 2022-02-24 08:52:25 +01:00
David Fort
0435b5a65d Implement smartcard logon 2022-02-24 08:52:25 +01:00
Armin Novak
b3790d7454 Removed Smartcard files from settings
* Removed file names from settings
* Added temporary file creation for pkinit
2022-02-24 08:52:25 +01:00
Armin Novak
649527ef8d Fixed const correctness of freerdp_smartcard_list 2022-02-24 08:52:25 +01:00
Armin Novak
b46d74806e Removed FreeRDP_ListSmartcards setting
* Directly print smartcard list without intermediate setting
* Centralize the help text, clients do not need to add extra code
2022-02-24 08:52:25 +01:00
David Fort
44c82cd929 Fixes various akallabeth remarks 2022-02-24 08:52:25 +01:00
Armin Novak
a00238d253 Use freerdp_settings_set and _strdup 2022-02-24 08:52:25 +01:00
David Fort
cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
David Fort
62ac25ef54 smartcard_emu: enable to specify the smartcard pin 2022-02-24 08:52:25 +01:00
Armin Novak
538b34c51d Moved rail application start to client common 2022-02-22 16:43:21 +01:00
Armin Novak
1b71bba2a0 Fixed compilation warnings 2022-02-22 11:29:56 +01:00
Armin Novak
0c7e6c3c2d Refactored disp channel
* Assert all input parameters
* Use DISP_CHANNEL_NAME define for channel name
2022-02-22 11:29:56 +01:00
akallabeth
8b3f9431de Cleanup/code formatting 2022-02-22 09:44:13 +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
e136444f51 Fixed xinput and x11 event priority
* Prefer xinput events over x11 events for mouse input
* Prefer xinput raw events over xinput events:
  * Only use when the mouse is grabbed (events are not bound to a
    specific window but are global)
  * Only use for relative mouse input
2022-02-22 09:44:13 +01:00
akallabeth
e5592772ce Check return of ainput mouse event 2022-02-22 09:44:13 +01:00
akallabeth
d3ee52b0f8 Fix conversion of mous wheel valuet 2022-02-22 09:44:13 +01:00
akallabeth
d4be1717c2 Fixed window check
Ignore mouse events not originating in session window
2022-02-22 09:44:13 +01:00
akallabeth
855c9d3f4c Fixed broken format string 2022-02-22 09:44:13 +01:00
akallabeth
de81f54076 Add relative mouse input and no channel support 2022-02-22 09:44:13 +01:00
akallabeth
8a5bd522c7 Fixed scaling of discrete wheel input. 2022-02-22 09:44:13 +01:00
akallabeth
db00082974 Implemented xfreerdp relative mouse input 2022-02-22 09:44:13 +01:00
akallabeth
b1a2efde7d Implemented xfreerdp mouse grab 2022-02-22 09:44:13 +01:00
akallabeth
700d6dcd9e Use client/common mouse functions 2022-02-22 09:44:13 +01:00
akallabeth
4d3157c9cc Added common client mouse event functions 2022-02-22 09:44:13 +01:00
akallabeth
b2b70fcf6d Use common client channel handling 2022-02-22 09:44:13 +01:00
akallabeth
4ca5078027 Added common client channel handling 2022-02-22 09:44:13 +01:00
Armin Novak
b85333bb9e Automatically load advanced input channel 2022-02-22 09:44:13 +01:00
akallabeth
cdbfff87ea Unified client stop 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
Armin Novak
da9edc1829 Added mouse-relative option to command line 2022-02-22 09:44:13 +01:00
zbstao
bab45ff7da Fixed invalid password prompt on Windows system
Fixed invalid password prompt on Windows system
2022-02-17 11:01:34 +00:00
akallabeth
e3cf5928c4 Make mac native client build configuratble 2022-02-17 09:53:52 +00:00
Sumir Jha
3d77496fbb memory grows over time in wlfreerdp with /gfx:AVC44 fixed. 2022-02-15 10:58:41 +00: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
0cceaaf704 Fixed #7636: GetStringUTFLength requires jstring argument 2022-02-14 07:29:05 +00:00
Armin Novak
80cd8dcdc3 Fixed cyclic include 2022-02-10 12:49:00 +00:00
Armin Novak
cefb4e1237 Use freerdp_settings_set and _strdup 2022-02-02 13:43:31 +00:00
Armin Novak
3303aa1446 Fixed format string 2022-02-02 07:57:56 +00:00
Armin Novak
ef8c6e9a51 Fixed deprecated mac symbols 2022-02-02 07:57:56 +00:00
Armin Novak
b02995fc0b Fixed missing public linking for freerdp-client 2022-02-01 11:04:32 +00:00
Armin Novak
ca30e749e9 Fixed unused-but-set-variable and reserved identifier warnings 2022-02-01 08:48:21 +01:00
Armin Novak
aa3f3ea95f Fixed const warnings 2022-01-31 16:13:06 +01:00
Armin Novak
b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00