Commit Graph

799 Commits

Author SHA1 Message Date
Armin Novak
864ad5e681 Ignore unknown keywords for windows and posix type detection.
Eliminates wrong detection in case of an unknown keyword used.
2019-01-16 14:32:19 +01:00
Armin Novak
fc9e88d64f Added flag to silence command line parser logging during detection. 2019-01-16 14:32:19 +01:00
Armin Novak
89f3f7d837 Added extended error logging for assistance, rdp file and command line parser. 2019-01-16 14:32:19 +01:00
Armin Novak
b60045af27 New option to disable user certificate dialog
The new option +cert-deny aborts a connection automatically if
the certificate can not be validated by OpenSSL or via known hosts.
2018-12-14 10:17:52 +01:00
Jeffrey Hein
d316e7fa1e
Clarified defaults of /floatbar flag 2018-12-13 14:02:38 -08:00
Jeffrey Hein
1e84f00ef8
Added help description for /drive:hotplug,* 2018-12-12 11:29:58 -08:00
Armin Novak
717b0eac9e Enable smooth fonts by default. 2018-12-11 13:02:26 +01:00
Armin Novak
6a9fa3dcbd Refactored floatbar, extended command line settings. 2018-12-07 15:22:28 +01:00
Armin Novak
56156d217e Floatbar self contained. 2018-12-07 15:22:28 +01:00
Martin Fleisz
8c7f8eb395
Merge pull request #5085 from akallabeth/cert_callbacks_update
Refactored Certificate callbacks (but keep compatible)
2018-12-06 10:08:17 +01:00
Armin Novak
e04c319d21 Added new default certificate callbacks with extended information.
The extended information provided by VerifyCertificateEx and
VerifyChangedCertificateEx is now exploited by the new functions
client_cli_verify_certificate_ex and client_cli_verify_changed_certificate_ex.

The old callbacks now print out deprecation warnings to inform the
user and developer about this deprecation.
2018-12-04 09:35:24 +01:00
Alessandro Muggianu
9b1c9da6a2 Make "suppress output" setting available on command line 2018-12-04 09:31:30 +01:00
Armin Novak
e6e87eb3b3 Unified strto[u]l in cmdline.c
To clean up code all integer conversions are now done by
a helper function with proper checks in place.
2018-11-22 16:28:30 +01:00
Armin Novak
2f8737d973 Improved formatting of terminal help messages. 2018-11-22 15:56:37 +01:00
Armin Novak
f79eeb7446 Fixed NULL access checks. 2018-11-22 11:19:12 +01:00
Armin Novak
c8908c8be6 Updated windows shadow server assistance usage. 2018-11-22 11:11:31 +01:00
Armin Novak
a531930f36 Disable NLA for remote assistance. 2018-11-22 11:11:31 +01:00
Armin Novak
6de2129a90 assistance v2 support 2018-11-22 11:11:31 +01:00
David Fort
e118d14f6a cmdline: add window-position argument to set initial window position
This is useful if you want the window to be at a given position. The patch also mutualizes
the parsing of <xpos>x<ypos> or <width>x<height> arguments.
2018-11-15 14:40:03 +01:00
akallabeth
268a2c0cf8
Merge pull request #4979 from hardening/CAL
license: support CAL license
2018-11-14 13:45:31 +01:00
David Fort
b6e6575bf6 license: support CAL license
This patch simplifies the licensing code mutualizing encryption / decryption
routines. It also adds the support for client_info packet that allows to send a
previously saved CAL file.
2018-11-13 09:42:19 +01:00
Bernhard Miklautz
8be6ec9720 fix [cmdline]: parameter parsing
use strtoul instead of strtol
2018-11-08 11:13:57 +01:00
Bernhard Miklautz
1222e7060b new [crypto/tls]: add support to set tls security level
The newly introduced option /tls-seclevel can be used to set the tls
security level on systems with openssl >= 1.1.0 or libressl.
As default level 1 is used as higher levels might prohibit connections
to older systems.
2018-11-08 11:13:15 +01:00
Armin Novak
88d310ff2c Fixed compiler warnings (casts, ...) 2018-10-18 09:09:30 +02:00
Martin Fleisz
e46d1d95ff
Merge pull request #4926 from akallabeth/primary_order_checks
Order data validation and correction
2018-10-17 16:02:28 +02:00
Armin Novak
7b860ce96a Add command line option /relax-order-checks 2018-10-17 12:16:58 +02:00
Armin Novak
9729590870 Fixed command line setting of flags, unified string replace 2018-10-15 12:04:33 +02:00
David Fort
2e1bf90bd9
Merge pull request #4885 from akallabeth/autoreconnect_handle_window_events
Fixed #3423: Process xevents when in reconnect mode.
2018-10-03 09:42:16 +02:00
Martin Fleisz
a90b74b8dc
Merge pull request #4879 from akallabeth/clip_fix
Fixes for clipboard #4876
2018-09-26 09:37:41 +02:00
akallabeth
0b8a66188c
Merge pull request #4865 from mmattes/feature/floatbar
Feature/floatbar for X11
2018-09-25 16:34:20 +02:00
Armin Novak
51f97f2d3e Fixed #3423: Process xevents when in reconnect mode.
Fixed crashes due to unloaded disp channel in reconnect mode.
2018-09-24 16:24:32 +02:00
Armin Novak
228e63d619 Free RDP_KEYBOARD_LAYOUT with freerdp_keyboard_layouts_free 2018-09-24 12:47:32 +02:00
Armin Novak
897c0c72a7 Unified auto_reconnect functions for all clients. 2018-09-24 10:31:43 +02:00
Markus Mattes
21e4804a7f implemented floatbar for x11 2018-09-18 21:25:51 +02:00
Martin Fleisz
0b7b9c0dc4
Merge pull request #4842 from akallabeth/smartcard_rdp_logon
Added /smartcard-logon option to set flag. (Stripped version of #4837…
2018-09-17 09:08:47 +02:00
rbarnett
e296a55fad Reject unknown connection type values for /network command line option. 2018-09-11 10:17:52 -05:00
Armin Novak
cbb4be4122 Removed manipulation of authentication modes.
Let +smartcard-logon be a simple flag not changing authentication
settings. This can be done with the /sec options already.
2018-09-07 10:54:33 +02:00
Armin Novak
0de43c8b85 Added /smartcard-logon option to set flag. (Stripped version of #4837 by @informatimago) 2018-09-04 15:50:03 +02:00
Armin Novak
456b95cbfc Fixed size of command line value string. 2018-08-27 14:34:42 +02:00
Armin Novak
114abad767 Removed use of strcpy. 2018-08-27 14:34:09 +02:00
Martin Fleisz
0fb19d04be
Merge pull request #4810 from akallabeth/no_proxy_support
No proxy support
2018-08-24 11:41:58 +02:00
Martin Fleisz
f9e52c1850
Merge pull request #4815 from akallabeth/async_transport_remove
Removed +async-transport options
2018-08-24 09:48:51 +02:00
Armin Novak
b5df39756d Added option to ignore proxy env. 2018-08-23 17:02:43 +02:00
Armin Novak
a0facc329f Added option to deactivate proxy. 2018-08-23 17:02:43 +02:00
Martin Fleisz
3381ca46e6
Merge pull request #4787 from akallabeth/redirect_fqdn_fix
Redirect fqdn fix
2018-08-23 16:07:48 +02:00
Armin Novak
c3a26b0d6a Removed +async-transport options
The async transport option is broken by design.
If used the main loop is called from the transport thread and the
main thread of the application.
Unless the transport layer is refactored to just work on queues
(input and output) this option will never work, therefore remove it.
2018-08-22 13:56:37 +02:00
Ondrej Holy
f36054b379 client/cmdline: Fix leak found by covscan
leaked_storage: Variable "base64" going out of scope leaks the storage it points to.
2018-08-22 13:35:43 +02:00
Ondrej Holy
e9549a3bdc client/common: Fix leak found by covscan
leaked_storage: Variable "file" going out of scope leaks the storage it points to.
2018-08-22 13:35:43 +02:00
Armin Novak
13564dbb41 Allow redirect address override with a list of values. 2018-08-08 12:30:47 +02:00
Armin Novak
cc5e402cda Added command line option /redirect-prefer:<fqdn|ip|netbios>
Since redirection sometimes happens with internal DNS names that
are resolved different by outside DNS it must be possible to override
the preferred redirection hint.
2018-08-08 11:24:13 +02:00
Armin Novak
eed5a41b6e Fixed funtion to function pointer argument mismatch 2018-08-01 12:56:18 +02:00
Martin Fleisz
b34e3bcf73
Merge pull request #4681 from akallabeth/wording_consistent
Fixed #4636: Consistent wording for boolean options depending on default
2018-06-26 10:19:41 +02:00
Armin Novak
348ecc4c81 Fixed memory leak in command line value parsing. 2018-06-19 12:57:28 +02:00
Pascal J. Bourguignon
15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
Armin Novak
8dba31ea0e Fixed #4636: Consistent wording for boolean options depending on default. 2018-05-17 10:30:13 +02:00
Martin Fleisz
7eb12bb028
Merge pull request #4610 from akallabeth/cmd_strtol_fix
Fix #4597: Do string argument checks before a possible strtol
2018-05-04 13:28:18 +02:00
Martin Fleisz
296b19e172
Merge pull request #4596 from p-pautov/rdg_ssl_fixes
RDG related fixes for better compatibility with mstsc
2018-05-03 10:23:12 +02:00
Armin Novak
1fd5c53a74 Fix #4597: Do string argument checks before a possible strtol
strtol sets errno, which must be reset if it is no abort condition.
Invert the comparisons to avoid that.
2018-05-02 12:57:34 +02:00
David Fort
0f968b782c proxy: cleanup SOCKS support and add user/password support 2018-05-02 10:51:16 +02:00
Jiri Sasek
1ba31551a6 socks proxy reply fix 2018-05-02 09:43:03 +02:00
Pavel Pautov
32505fda13 Apply "authentication level" RDP property only to non-RDG connections (as mstsc does). 2018-04-25 18:12:23 -07:00
Jiri Sasek
b1c1549ad1 SOCKS proxy support 2018-04-23 21:01:01 +02:00
MartinHaimberger
c73c54a626
Merge pull request #4477 from akallabeth/command_line_fix
Detect command line flags in case RDP or MSINCIDENT files are used.
2018-04-04 10:06:07 +02:00
Martin Fleisz
edce38613a
Merge pull request #4529 from akallabeth/wlog_cleanup_fix
Fix #4524: Initialize with cleanup handler
2018-04-04 09:32:46 +02:00
Kai Harms
2dffc3ef96 Fix spelling of network commandline values 2018-04-03 12:12:58 +00:00
Armin Novak
e0d112d548 Removed all calls to WLog_Init and WLog_Uninit
Since the calls are no longer required remove their usage.
2018-04-03 13:06:41 +02:00
Jakob Kaivo
3a1d70d9ba add support for the "pcb" block in .rdp files provided by Project Honolulu in the VM interface 2018-03-31 22:15:39 -04:00
Armin Novak
9bd13c25c9 Added WaitableTimer implementation for mac OS. 2018-03-12 13:39:21 +01:00
Armin Novak
f430b55abf Detect command line flags in case RDP or MSINCIDENT files are used. 2018-03-09 14:25:45 +01:00
Martin Fleisz
8e5d5fa8ea
Merge pull request #4450 from akallabeth/assist_fix
Assistance and RDP file parser fix
2018-02-21 16:56:55 +01:00
Martin Fleisz
3cfa837b0c
Merge pull request #4441 from akallabeth/paa
[cleanup] Support for gatewayaccesstoken / PAA
2018-02-19 17:28:32 +01:00
Armin Novak
68641f109b Fixed .rdp and .msrcIncident checks.
The command line detection fails, if only one of the aforementioned
files is used as an argument. Detect those first and ignore command
line detection if found.
2018-02-19 10:00:54 +01:00
Martin Fleisz
5d1ff02d02
Merge pull request #4414 from akallabeth/pthread_cleanup_fix
Pthread cleanup fix
2018-02-15 11:02:37 +01:00
Jacco Braat
b592684734 Added to rdp file parsing: gatewayaccesstoken:s:<token>
Added to commandline parsing: /gat:<token>
Added GatewayAccessToken to sings
2018-02-15 10:56:57 +01:00
Martin Fleisz
19a00f2099
Merge pull request #4325 from akallabeth/fixes_com
Fixes serial redirection name check and SAM file parser
2018-02-15 10:39:33 +01:00
David Fort
b8e3b232de video: mutualize things in the common channel code 2018-02-13 10:52:53 +01:00
David Fort
b84839b21c video: a skeleton for MS-RDPEVOR client
Basics for implementing the client side of the MS-RDPEVOR channel.

Sponsored by: Rangee GmbH (http://www.rangee.de)
2018-02-13 10:51:07 +01:00
Armin Novak
7e26c54866 Set up and tear down WLog 2018-02-09 12:08:39 +01:00
Bernhard Miklautz
db2d1ffcce cmdline refactor: move cmd struct to extra file
Move the cmd struct to a extra header file. This allows it to only
include the header file in generate_argument_docbook.c and therefore
remove a linker dependencies.
2018-02-01 17:13:44 +01:00
David Fort
e1cc601963
Merge pull request #4323 from akallabeth/scanbuild_fixes
Scanbuild and other warnings fixed
2018-01-08 11:16:21 +01:00
akallabeth
27aac21c03 Fixed drive redirection argument check
Allow special cases '*' and '%' to pass parameter checks.
2017-12-28 14:05:11 +01:00
Armin Novak
4483751e08 Fixed help for /parallel 2017-12-21 15:19:29 +01:00
Armin Novak
6a21bdae3d Fixed various scanbuild warnings. 2017-12-21 09:34:35 +01:00
Armin Novak
a202476422 Fixed RDP file parser for unicode.
There was a memory corruption hidden due to ignoring the
buffer size argument.
2017-12-20 13:44:24 +01:00
akallabeth
71fd6f3116
Merge pull request #4313 from hardening/dyn_res_update
disp: implement dynamic resolution for X11
2017-12-19 13:49:02 +01:00
David Fort
80dab90f1a disp: implement dynamic resolution for X11
If the display channel is available we use it to allow the user to resize the
xfreerdp window. When the window is resized we announce a new monitor layout and
the server reacts by doing a reactivation sequence to the new size.
The minimum window size is limited to 300x300 as 2012 servers crash horribly
if we send them a smaller layout.
2017-12-14 15:13:11 +01:00
Bernhard Miklautz
1e6fea7fa7 fix channel/smartcard: simplify channel variables
Path was not really used and name was duplicated. Use the device->Name
directly.
2017-12-13 17:04:06 +01:00
David Fort
a6cfd3c49a geometry: a skeleton for the MS-RDPEGT channel
The base for implementing the MS-RDPEGT client channel that allows to track window
geometry.
2017-12-08 11:26:29 +01:00
Martin Fleisz
876a7697be
Merge pull request #4297 from akallabeth/cmd_parser_hardening
Fix #4296: Hardened command line post filter.
2017-12-05 14:40:03 +01:00
Armin Novak
78a0c4c618 Fix #4296: Hardened command line post filter. 2017-12-01 13:13:21 +01:00
akallabeth
0cb5907664
Merge pull request #4275 from ondrejholy/big-endian-fixes
Big endian fixes
2017-12-01 11:24:50 +01:00
David Fort
cf33966f2e
Merge pull request #4282 from akallabeth/force_ipv6
Fix #4281: Added option to prefer IPv6 over IPv4
2017-11-28 10:48:53 +01:00
Bernhard Miklautz
baf52f529f
Merge pull request #4261 from akallabeth/doc_ssl_store
Fix #3890: Point to OpenSSL doc for private CA
2017-11-27 11:46:54 +01:00
Armin Novak
2cc64298f2 Fix #4281: Added option to prefer IPv6 over IPv4 2017-11-27 11:43:54 +01:00
David Fort
8f8ce70f3d
Merge pull request #4229 from akallabeth/from_stdin_args
Option to force password prompt before connection
2017-11-24 15:51:46 +01:00
Ondrej Holy
90000fd36e client/common: Fix two memory leaks in RDP file processing
FALSE is returned immediately in case of parsing error and thus buffer
copy is leaked. Let's release the memory properly.
2017-11-24 10:24:47 +01:00
Ondrej Holy
5dcd1ebb06 client/common: Fix RDP file processing on big endian
TestClientRdpFile fails on big endian machines due to some bug in
unicode processing. Let's drop all the unicode functions and convert
unicode input into ascii as soon as possible. This significantly
simplify RDP file processing and also fixes TestClientRdpFile on
big endian machines.

https://github.com/FreeRDP/FreeRDP/issues/4231
2017-11-23 20:00:09 +01:00
akallabeth
71e38a4ce7
Merge pull request #4267 from ondrejholy/autofips
Enable FIPS mode automatically
2017-11-23 10:49:15 +01:00
Ondrej Holy
6973b14eed Enable FIPS mode automatically
FreeRDP aborts if OpenSSL operates in FIPS mode and +fipsmode is not
manually specified. Let's prevent the abortion and enable the necessary
options in that case automatically.
2017-11-23 10:09:17 +01:00
Martin Fleisz
2f281c06ba
Merge pull request #4244 from akallabeth/drivestoredirect
Fix parsing of drivestoredirect (#3267)
2017-11-22 12:23:04 +01:00
Armin Novak
7183189328 Fix #4257: Proper error checks for /kbd argument 2017-11-22 11:03:43 +01:00
akallabeth
77a921240b Testing argument to end with file extension. 2017-11-21 19:10:28 +01:00
Armin Novak
65482ee9bf Fixed #4249: Corruption due to recursive parser 2017-11-21 13:47:28 +01:00
Armin Novak
12a9b9a0b4 Fix #3890: Point to OpenSSL doc for private CA 2017-11-21 11:47:33 +01:00
Armin Novak
6504b81b9e Fix parsing of drivestoredirect (#3267) 2017-11-21 10:46:50 +01:00
Armin Novak
a3fb3270dc Fix #3509: Added Ctrl+Alt+Enter description 2017-11-20 13:22:53 +01:00
Armin Novak
d593b3ef58 Better description for drive redirection (Fix #3513) 2017-11-17 13:44:56 +01:00
Armin Novak
1bb4f121b4 Fixed formatting. 2017-11-17 12:45:28 +01:00
Brent Collins
1129634617 Move the disabling nla and setting the fips encryption mode based on fips
mode to happen after argument parsing to ensure it always enforced.
2017-11-17 12:43:07 +01:00
Brent Collins
d98b88642b Add new command-line option to force xfreerdp into a fips compliant mode.
This option will ensure that NLA is disabled(since NTLM uses weak crypto algorithms), FIPS
encryption is enabled, and ensure fips mode is enabled for openssl.

Selectively override specific uses of MD5/RC4 with new API calls specifically tailored to override FIPS.

Add comments on why overriding the use of these algorithms under FIPS is acceptable for the locations where overrides happen.

Remove check of server proprietary certificate which was already being ignore to avoid use of MD5.

Initialize winpr openssl earlier to ensure fips mode is set before starting using any crypto algorithms.
2017-11-17 12:43:06 +01:00
Armin Novak
ac0a912a20 Option to force password prompt before connection
The idea is based on #3257.
If a non NLA connection is requested the password callbacks are not executed
and there is currently no way to read from stdin.
This extension of /from-stdin allows reading the passwords
before the connection is established.
2017-11-16 09:55:45 +01:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Armin Novak
8c2bd951ae Allow printing of custom arguments in help. 2017-11-15 15:25:34 +01:00
Ben Cohen
0e90841a18 Forward ssh-agent data between ssh-agent and RDP
Add the sshagent plugin to forward the ssh-agent protocol over an RDP
dynamic virtual channel, just as the normal ssh-agent forwards it over
an SSH channel.  Add the "/ssh-agent" command line option to enable it.
Usage:

Run FreeRDP with the ssh-agent plugin enabled:

   xfreerdp /ssh-agent ...

In the remote desktop session run xrdp-ssh-agent and evaluate the output
in the shell as for ssh-agent to set the required environment variables
(specifically $SSH_AUTH_SOCK):

   eval "$(xrdp-ssh-agent -s)"

This is the same as for the normal ssh-agent.  You would typically do
this in your Xsession or /etc/xrdp/startwm.sh.

Limitations:

1. Error checking and handling could be improved.

2. This is only tested on Linux and will only work on systems where
clients talk to the ssh-agent via Unix domain sockets.  It won't
currently work on Windows but it could be ported.
2017-11-10 20:16:00 +00:00
David Fort
960b992f76
Merge pull request #4151 from ondrejholy/manpages-update-master
Manpage and /help update
2017-11-09 15:24:27 +01:00
David Fort
5d5376faa7 egfx: fix disconnection caused by invalid cache entries due to wrong announced cache size
Added some checks so that when setting a cache entry fails, we close connection (or
we fail later when trying to use that empty entry).
The small cache egfx capability has also been fixed.
2017-10-10 17:12:16 +02:00
Bernhard Miklautz
1aec784f75 feat: add support for .source_version
When building packages, especially when source packages are used, git is
not necessarily available or the source isn't provided in git. In those
cases it wasn't possible to set the GIT_REVISION and --version shows
"n/a" for the git revision.

If the file .source_version is available now the content of it is used
as GIT_REVISION. Packagers might want to add a .source_version file
when they don't build the packages from git.

Possible breaking change:

The variable PRODUCT_VERSION isn't available anymore. Use GIT_REVISION
instead.
2017-10-06 15:02:23 +02:00
Ondrej Holy
c5ae72972b cmdline: Sort arguments list
Arguments are not sorted and it is hard to find something in manpages,
or /help output. Let's sort the list.
2017-09-27 11:23:36 +02:00
Ondrej Holy
d0dfa9353f cmdline: Improve /help output
This patch contains several improvements in order to make the help
output more readable (reduce length of first column):
- move default value into description
- use ... instead of too long format strings
- use [] for optional arguments
2017-09-27 11:20:25 +02:00
Ondrej Holy
cf1fbf55d5 cmdline: Improve arguments list
This patch contains several improvements for arguments list:
- use capitals consistently
- remove full stop sign at the end
- use "experimental" constiently for unstable and hacky features
- use <> for variables consistenly
- use [] for optional parts consistently.
- shorten some format strings to make /help more readable
- replace whitespace in variables for better readability (especialy man page)
- fix wrong argument tyes
- add missing formats
2017-09-27 11:20:25 +02:00
Bernhard Miklautz
15c7cb8cb2 Enable clipboard channel per default 2017-09-27 09:45:07 +02:00
Armin Novak
2e83abb90c Fixed client context setup with default initializer. 2017-09-25 13:33:05 +02:00
Bernhard Miklautz
4592deee72 extend /size to allow width or height percentages (#4146)
If the size parameter is used with a percentages like /size:50% now
an additional 'w' or 'h' can be appended (like /size:50%w) to specify
where the percentage should be applied. If both or none are set the
behavior is like it was before and the percentage is applied to width
and height.
2017-09-25 09:35:49 +02:00
Jukka-Pekka Virtanen
509059f8ea Expose PasswordIsSmartcardPin settings from cmdline via password-is-pin arg 2017-09-23 14:28:26 +02:00
Bernhard Miklautz
52fbfb7b12 fix clang warnings, directly include wtypes.h (#4097)
* build: clang use -Wno-unused-command-line-argument

With clang 5.0 builds are quite noisy otherwise.

* Directly include wtypes.h

Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used.

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: parentheses-equality

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: tautological-compare

* fix build warnings with clang 5

clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning:
incompatible pointer types passing 'size_t *' (aka 'unsigned
long *') to parameter of type 'UINT32 *' (aka 'unsigned int *')
[-Wincompatible-pointer-types]
2017-08-29 09:09:38 +02:00
Armin Novak
c3d4b7d262 fseeko and ftello for 64bit file support. 2017-08-14 08:42:49 +02:00
Armin Novak
dd4b5ea126 Disable JPEG codec support if not compiled in. 2017-07-24 15:23:36 +02:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
dodo040
4e055453ab fix smartcard argument parsing 2017-07-19 13:16:08 +02:00
dodo040
722e927c64 redirect specific smartcard readers 2017-07-19 13:16:08 +02:00
Armin Novak
5764d5a78a Disable GFX H264 if no backend compiled in. 2017-07-17 09:25:21 +02:00
Norbert Federa
36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Martin Fleisz
a391a3decc client: Check if channel has already been added 2017-02-24 13:03:03 +01:00
Bernhard Miklautz
23cfd34525 Merge pull request #3746 from volth/command-line-action-script-rebased
Add command line option to override action script path
2017-02-20 14:08:14 +01:00
Volth
c333aa359f Add command line option to override action script path 2017-02-17 13:09:32 +00:00
Armin Novak
4f3633b409 Fix for #3627 2017-02-17 11:54:36 +01:00
akallabeth
4065581c98 Merge pull request #3756 from bigpjo/master
.RDP Password Attribute
2017-02-17 09:52:22 +01:00
bigpjo
51b47890ef Change request from akallabeth
Change to allow username command line parameter to overwrite the .RDP
username
2017-02-16 19:16:56 +00:00
Armin Novak
198bc6d9e1 Fixed compiler warnings. 2017-02-16 13:17:49 +01:00
Armin Novak
291362e2df Fixed possible memory leak. 2017-02-15 15:42:14 +01:00
Armin Novak
2f8e206c58 Fixed freerdp_client_parse_rdp_file_buffer
The parser function needs a modifyable copy of the input buffer.
2017-02-14 16:02:11 +01:00
bigpjo
f0a52d431d .RDP Password Attribute
Allow password to be stored in .RDP file and parsed and settings
updated, this will allow for dynamic .RDP files to be created with
complete login credentials, using this method the username, server and
password will no longer be visible within process lists.

Also fixed issue of username and domain being read from .RDP files and
set to null by command line processor.
2017-02-10 20:38:52 +00:00
Volth
e7487cea27 Add command line option to override action script path 2017-02-08 08:30:24 +00:00
akallabeth
f93e277b5f Merge pull request #3735 from mfleisz/cmake_install_pdb_fix
Build: Use correct pdb names when installing with symbols
2017-02-01 11:06:52 +01:00
Mike Baum
6de47e7936 Flush stdout when asking about certificate 2017-01-31 15:33:44 -05:00
Martin Fleisz
c2eacd3b31 Build: Use correct pdb names when installing with symbols 2017-01-31 13:32:51 +01:00
Bernhard Miklautz
af7febf5da cmdline: fix wlog man page reference
It's wlog(7) now.
2017-01-16 11:11:59 +01:00
Bernhard Miklautz
bbb6bf6b43 Include major version number in library names
Currently it is not possible to cleanly install multiple major version
of FreeRDP concurrently as some of the development libraries (.so files)
files can conflict.

This change renames all libraries to include the major version number in
the library name to fix this limitation.

The list of changed libraries:

libwinpr-tools.so -> libwinpr-tools2.so
libwinpr.so -> libwinpr2.so
libfreerdp.so -> libfreerdp2.so
libfreerdp-client.so -> libfreerdp-client2.so
libfreerdp-shadow.so -> libfreerdp-shadow2.so
libfreerdp-server.so ->  libfreerdp-server2.so
libfreerdp-shadow-subsystem.so -> libfreerdp-shadow-subsystem2.so
libuwac.so -> libuwac0.so

As the library names have changed, projects that use FreeRDP will need to
update their dependencies. -
If pkg-config or cmake find modules are used, reconfiguration might be
sufficient.

Fixes #3460
2017-01-16 11:11:58 +01:00
akallabeth
3762401d43 Merge pull request #1750 from ccpp/master
Support for HTTP-Proxy
2017-01-11 11:02:00 +01:00
Armin Novak
03adbd24a8 AutoReconnect support unlimited retries. 2017-01-09 12:34:09 +01:00
Martin Fleisz
8d0809cf26 Merge pull request #3657 from akallabeth/auto_reconnect_max_retry_support
New argument /auto-reconnect-max-retries:<retries>
2016-12-19 13:14:30 +01:00
Armin Novak
d7df692fe9 Sanity check for auto reconnect retries. 2016-12-19 09:17:08 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
e447e57aa9 New argument /auto-reconnect-max-retries:<retries> 2016-12-16 12:59:57 +01:00
Christian Plattner
58ef7cc42d More abstracted proxy handling 2016-12-10 23:13:35 +01:00
Christian Plattner
5d10b3bf5b Merge branch 'gateway-http-bugfix'
Conflicts:
	client/common/cmdline.c
	include/freerdp/settings.h
	libfreerdp/common/settings.c
	libfreerdp/core/settings.c
	libfreerdp/core/tcp.c
	libfreerdp/core/transport.c
2016-12-09 20:43:02 +01:00
Norbert Federa
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Marc-André Moreau
36db0cc325 channels: properly handle VirtualChannelEntryEx in static virtual channel loading 2016-11-16 09:52:24 -05:00
Marc-André Moreau
2cce8e9fbc channels: migrate drdynvc to extended virtual channel API 2016-11-15 10:58:38 -05:00
Marc-André Moreau
2259e91adc channels: prepare virtual channel system for extended virtual channel API 2016-11-15 09:09:30 -05:00
David Fort
02b4b5b001 Added a command line parameter to set the time passed in packet loop 2016-10-17 18:56:52 +02:00
Armin Novak
14fcfbbf31 Addin loader using proper function pointer defines. 2016-10-07 14:06:46 +02:00
Armin Novak
5a2c249749 Disabled glyph-cache 2016-10-06 13:43:12 +02:00
Armin Novak
0f9ab81097 Fixed command line setting. 2016-10-06 13:43:08 +02:00
Armin Novak
4027a1d978 Added error checks. 2016-10-06 13:43:07 +02:00
Armin Novak
543631ddd3 Added better argument checks. 2016-10-06 13:43:06 +02:00
Armin Novak
716c5c53e9 256 color support. 2016-10-06 13:42:59 +02:00
David Fort
0905cc2ba7 man pages needed love
This patch cleans things up so that generated man pages for argument are nicer.
2016-06-21 09:49:44 +02:00
Norbert Federa
7a68eebb03 cmake: remove some void statements and fix winpr source group 2016-06-15 13:54:31 +02:00
Marc-André Moreau
e4714f3422 freerdp: fix Hyper-V connectivity, fix issues #2421 and #3325 2016-05-11 15:52:36 -04:00
Armin Novak
53445768ed Added command line option /cert-tofu 2016-03-31 12:16:55 +02:00
Bernhard Miklautz
a0d9969a30 Merge pull request #3254 from akallabeth/avc444_cmd_arg
Added advanced gfx command line options.
2016-03-31 11:43:38 +02:00
Armin Novak
81450dd37c Cleaned up empty if. 2016-03-31 11:01:45 +02:00
Bernhard Miklautz
9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Armin Novak
50873be062 Added advanced gfx command line options. 2016-03-24 16:36:43 +01:00
Armin Novak
fd26624bcb Parse RDP and assistance files in parser.
The command line parser is now populating the settings with
the RDP or assistance file content before parsing the rest
of the arguments.
2016-03-16 13:20:11 +01:00
Armin Novak
bb3448f2a7 Set variable to NULL to prevent double free. 2016-03-07 13:12:38 +01:00
Armin Novak
4bb33e904a Reparse command line after RDP or assistance file. 2016-03-07 09:45:09 +01:00
Armin Novak
36241ed540 Fix memory leaks if parsed multiple times. 2016-03-07 09:45:04 +01:00
Bernhard Miklautz
25506348d0 Merge pull request #3168 from akallabeth/visibility_fixes
Fixed default visibility.
2016-02-29 16:59:58 +01:00
Armin Novak
c182be093d Removed module.def from build config. 2016-02-29 15:24:07 +01:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
Armin Novak
dccf40c2bc Fixed duplicate loading of smartcard and printers. 2016-02-26 15:21:11 +01:00
Bernhard Miklautz
e6f013eac7 fix spelling
replace occured with occurred
Fixes #3142
2016-02-22 17:01:43 +01:00
Armin Novak
ae4a1ee342 Abort certificate accept if password is read from stdin. 2016-02-19 10:25:21 +01:00
Hardening
2a3e9996b3 Merge pull request #2710 from akallabeth/cert_temp_accept_v2
Extended certificate callbacks.
2016-02-15 13:52:47 +01:00
Isaac Richter
1f6ba7963c Enable display scaling in client 2016-02-05 11:08:27 -08:00
Armin Novak
5e46a6e4be Replaced getline with custom GetLine. 2016-02-05 02:05:37 +01:00
Armin Novak
b35f6658b9 Moved common code from cli clients to client lib. 2016-02-05 02:05:37 +01:00
Armin Novak
cd05ea7452 Fixed error checks for command line parser. 2016-02-01 15:18:34 +01:00
Armin Novak
035f127081 Added get_build_config functions. 2016-01-28 14:26:50 +01:00
Armin Novak
46a079fcb6 Added new command line options for logger.
The new command line options /log-level:<level> and
/log-filters:<filter>:<level> allow setting default log
level and log module filter to be set.
2016-01-23 15:16:13 +01:00
Bernhard Miklautz
7c03db342c add parameter buildconfig
Extend winpr and client/common to support a new option "/buildconfig".
When used build the following build specific information is print:
* cmake options
* cflags
* compiler
* target architecture
* cmake build type
2016-01-12 17:32:33 +01:00
Bernhard Miklautz
6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Hardening
b35d0aa8aa Merge pull request #2779 from RolKau/2779_ptrbtn
Send correct buttons when using a left-handed mouse
2015-12-17 00:04:53 +01:00
Roland Kaufmann
600d3c5ccb Add option to disable pointer button mapping
In case the old behaviour of not reverse-mapping the mouse buttons is
desirable, a command-line option is added to disable the mapping. This
option is made experimental for the time being.

The default is to do the reverse mapping, as this is the intuitive
behaviour (the mouse then works as it would on the console).
2015-12-15 17:42:57 +01:00
Armin Novak
6ed43cd6ec Updated pdb file locations.
Now supporting generators NMake and Visual Studio.
2015-12-15 12:08:35 +01:00
Armin Novak
cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00
Armin Novak
e223684fcb args arrays static.
When creating static builds the args arrays collided due
to global visibility.
2015-12-15 12:07:21 +01:00
Bernhard Miklautz
05c02da742 settings: update settings/help to match
* wallpaper was off but help said "default: on"
* compression is on but help said "default: off"

Fixes #2853
2015-08-28 11:09:38 +02:00
MartinHaimberger
45f9519b58 Merge pull request #2723 from akallabeth/pwd_from_stdin
New /from-stdin
2015-07-15 14:12:13 +02:00
Bernhard Miklautz
1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Marc-André Moreau
cf2f4bf9cf Merge pull request #2737 from nfedera/nf-fix-gdi-return-value-weirdness
libfreerdp/gdi: fixed gdi return value madness
2015-06-26 09:24:08 -04:00
Norbert Federa
bb9536b867 libfreerdp/gdi: fixed gdi return value madness
Mostly booleanization to comply with the MS API
2015-06-26 14:32:38 +02:00
Marc-André Moreau
ddf2519f1e Merge pull request #2719 from bmiklautz/pull/2481
OSS, tsmf, usb and BSD fixes and improvements
2015-06-26 08:27:22 -04:00
Armin Novak
e969049aa3 Removed unused variable and incorrect comment. 2015-06-23 16:20:59 +02:00
Armin Novak
2d41cb9467 Updated from-stdin help message. 2015-06-23 16:09:39 +02:00
Armin Novak
5a5ed77c57 Added /from-stdin 2015-06-23 14:59:54 +02:00
Armin Novak
2f81d99327 Added missing argument checks. 2015-06-23 12:17:37 +02:00
Bernhard Miklautz
09445c2b0e nla and cmdline: integrated feedback
* fix possible problems with 0 size lengths
* add return value checks
2015-06-23 10:14:11 +02:00
Bernhard Miklautz
af81a91ea7 windows: fix compilation and warnings 2015-06-22 19:31:25 +02:00
Bernhard Miklautz
06502e6a91 misc: integrate pull request feedback 2015-06-22 19:24:30 +02:00
Bernhard Miklautz
1b8dd139a9 cmd line: add missing checks
* strdup
* some allocs
2015-06-22 19:23:57 +02:00
David FORT
7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Bernhard Miklautz
bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Armin Novak
c3e368bd4b Fixed typo and invalid domain name. 2015-06-18 16:07:09 +02:00
Armin Novak
90cc7eb3c8 UPN syntax fix: domain must be empty, not NULL. 2015-06-18 13:01:23 +02:00
Armin Novak
427d85f5f0 Added user setting if no domain provided. 2015-06-18 12:01:17 +02:00
Armin Novak
d5c3f210e9 Fixed variable parsed. 2015-06-18 11:49:16 +02:00
Armin Novak
64529b6d60 Using last @ for domain split.
Command line parser splits username after
parsing all options.
2015-06-18 11:35:22 +02:00
Armin Novak
3e26940547 Allowing UPN syntax for user. 2015-06-15 09:47:16 +02:00
ivan-83
83a40a32a7 * tsmf: OSS code cleanup
+ urbdrc: add devd support (not tested)
* fix FindUUID detection ubder BSD
* wlog: fix prev commit: build error on Windows
* cmdline: add /usb syntax help
2015-05-27 22:58:41 +03:00
ivan-83
94a7abd2af + tsmf: OSS initial suppot (not work yet)
* tsmf: fix video playback on FreeBSD (proper shared object name)
* tsmf: renamed args: audio->sys, audio-dev->dev
* audin: OSS fix, now it work
* cmdline: add syntax help for /audin, /rdpsnd, /tsmf
* add debug messages
2015-05-27 22:54:13 +03:00
Marc-André Moreau
29d14773c8 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	client/Windows/wf_client.c
	libfreerdp/common/assistance.c
2015-05-20 10:12:24 -04:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Marc-André Moreau
6b1fefea40 freerdp: fix remote assistance mode, add multi-address connection 2015-05-06 16:32:45 -04:00
Norbert Federa
ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Bryan Everly
8c75127a67 Necessary changes to get latest branch working on OpenBSD 5.6 2015-04-21 14:42:06 -04:00
Bernhard Miklautz
0615c13dbb Fix regression introduced in 0b7f9d4
This fixes problems with command line parsing.
2015-04-02 22:53:45 +02:00
Armin Novak
878aecfa48 Fixed conversion warnings. 2015-03-31 15:18:45 +02:00
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Armin Novak
47f38b3059 Fixed uninitialized test argument buffer. 2015-03-23 14:14:38 +01:00
Marc-André Moreau
6202f48c12 libfreerdp-core: add configurable TSG/RGB fallback, fix edge cases 2015-03-19 11:44:47 -04:00
Marc-André Moreau
2094501d8b freerdp: fix failing tests 2015-03-16 09:26:38 -04:00
Armin Novak
b39940e0a5 Added ignore unkown keyword flag to detection. 2015-03-16 10:25:31 +01:00
Armin Novak
c380fb3520 Added flag to ignore unknown keywords
freerdp_client_settings_parse_command_line now allows ignoring
unknown keywords.
2015-03-16 10:15:37 +01:00
ivan-83
9e7e4ce7ff Merge branch 'master' of github.com:ivan-83/FreeRDP 2015-03-13 01:39:41 +03:00
ivan-83
7b3a552988 + audin OSS support (un tested now)
+ add: COMMAND_LINE_IGN_UNKNOWN_KEYWORD flag for CommandLineParseArgumentsA to ignory unknown keys without fail
+ add: lot of WLog_DBG() in drdynvc, add function names in existing
* change: error text in rdpsnd OSS
* fix: dev in rdpsnd does not work
* fix/change: audio-dev renamed to dev and now work in audin
* fix dynamic channels now work again
2015-03-13 01:28:44 +03:00
Marc-André Moreau
5ab34dfa3e Merge pull request #2456 from zhangzl2013/fix-realloc
Fix incorrect usage of realloc
2015-03-12 07:33:27 -04:00
Zhang Zhaolong
19f2354ee4 fix build error.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 15:04:38 +08:00
Zhang Zhaolong
0b7f9d4931 cmdline: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 12:26:04 +08:00
Zhang Zhaolong
d1c508768e common/file: fix incorrect usage of realloc.
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
2015-03-11 11:32:51 +08:00
Bernhard Miklautz
e9985c2093 settings: handle collection_add in detection case
Command line detection is run with dummy settings where not everything
is allocated. Collections (device, dynamic channel and static
channel) didn't handle this case properly.
2015-03-10 13:10:39 +01:00
bjcollins
ad3cb384d4 Fix the command line argument array setup for decorations argument. The initial value was set for the wrong field in the structure. The decorations is correctly initialized to on
anyways, but this is the correct formatting for the array element.
2015-02-13 14:57:52 -06:00
Marc-André Moreau
9b9fbd2ab1 xfreerdp: fix fullscreen mode 2015-02-10 15:15:30 -05:00
Marc-André Moreau
fa06c4d401 libfreerdp-core: improve reconnection 2015-02-06 14:21:26 -05:00
Marc-André Moreau
977cd21919 libfreerdp-core: don't enable GatewayBypassLocal by default 2015-01-28 15:16:31 -05:00