Commit Graph

1752 Commits

Author SHA1 Message Date
Marc-André Moreau
801dc0f826 freerdp: add configurable NTLM SAM file option for server-side NLA 2016-07-21 18:58:24 -04:00
Marc-André Moreau
1ffbd774e9 freerdp: fix sending of TLS alert on NLA failure, add better handling of server-side NLA in shadow server 2016-07-21 17:53:20 -04:00
Norbert Federa
ae9460f02f protocol violation: rdp_read_extended_info_packet
The clientTimeZone and all subsequent fields in the Extended Info Packet
(MS RDPBCGR 2.2.1.11.1.1.1) are optional but were not handled as such.
2016-06-27 10:56:40 +02:00
Norbert Federa
6a3b48d4f0 freerdp: remove static inet_ntop
inet_ntop is already implemented in winpr
2016-06-15 18:01:38 +02:00
Giovanni Panozzo
01a8db2c17 Fix some memory leaks in freerdp_settings_free() 2016-06-02 10:23:28 +02:00
akallabeth
345478bd8e Merge pull request #3376 from realjiangms/fix_client_gfx
channels/rdpgfx: Fix for gfx client
2016-05-31 09:37:31 +02:00
Norbert Federa
7a42a8dd5b freerdp/core/gcc: channel name hardening
According to [MS-RDPBCGR 2.2.1.3.4.1 Channel Definition Structure]
the channel name must be an 8-byte array containing a null-terminated
collection of seven ANSI characters that uniquely identify the channel.

We did not check if the transmitted name was null-terminated which
could have the usual severe effects on stabiliy and security since
the channel name is used in several functions expecting a null-
terminated string (strlen, printf, etc.)
2016-05-30 14:40:23 +02:00
zihao.jiang
e7d9e91864 channels/rdpgfx: Make freerdp_client_codecs_prepare calls codec reset. It fix broken h264 client from #3328. Also it doesn't make sense that we don't need width and height for codec initialization while we need them for codec reset 2016-05-30 02:00:05 +08:00
byteboon
158be3a9f0 fixed kerberos authentication
Details: cbSecurityTrailer was assumed to be a fixed length for all signatures, however for Kerberos authentication the signature may generate smaller than this value
2016-05-16 09:53:38 -07:00
Armin Novak
eacf2b542e Fixed memory leaks. 2016-05-12 10:01:30 +02:00
Marc-André Moreau
9b7c53c90a Merge pull request #3329 from awakecoding/hv_fix
freerdp: fix Hyper-V connectivity, fix issues #2421 and #3325
2016-05-11 17:00:35 -04:00
Marc-André Moreau
e4714f3422 freerdp: fix Hyper-V connectivity, fix issues #2421 and #3325 2016-05-11 15:52:36 -04:00
Marc-André Moreau
54cdd6a1ae channels/rdpgfx: fix resetting of codec contexts 2016-05-11 13:42:54 -04:00
Marc-André Moreau
915b9a15b1 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	winpr/libwinpr/bcrypt/CMakeLists.txt
2016-05-11 11:05:17 -04:00
Bernhard Miklautz
a61a642c9a core: don't advertise multi layout PDUs
If support for multi layout PDUs is advertised there are known issues
with Windows 7 and Windows 2008R2. Until those are resolved generally
disable multi layout PDUs.

See #3114 for details.
2016-05-04 09:47:23 +02:00
Bernhard Miklautz
f828595609 Merge pull request #3282 from akallabeth/input_arg_checks
Added argument checks for exported input functions.
2016-05-03 17:04:45 +02:00
Armin Novak
115f59d9b0 Added argument checks for exported input functions. 2016-05-03 16:17:22 +02:00
akallabeth
a62d962bc7 Merge pull request #3250 from mfleisz/cssp_v3
core: Add support for CredSSP version 3
2016-04-26 09:59:40 +02:00
Norbert Federa
9f148e6712 core: allow TS Gateway protocol violation
According to [MS-RDPBCGR 2.2.1.11.1.1.1] the TS_EXTENDED_INFO_PACKET
structure's cbClientAddress field must include the _mandatory_ NULL
terminator of the clientAddress field in its byte count.
However, connections proxied via Microsoft's TS Gateway set the
cbClientDir value to 0.
2016-04-19 14:09:58 +02:00
Norbert Federa
4ae77b8273 core: allow ms android client protocol violation
According to [MS-RDPBCGR 2.2.1.11.1.1.1] the TS_EXTENDED_INFO_PACKET
structure's cbClientDir field must include the _mandatory_ NULL
terminator of the ClientDir field.
However, since version 8.1.31.44, the Microsoft Remote Desktop Client
for Android sets cbClientDir to 0.
2016-04-11 10:50:27 +02:00
Norbert Federa
6ee445339b core: fix broken rdp security (server side)
- fixed typo in rdp_server_establish_keys
2016-04-08 14:47:35 +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
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
Martin Fleisz
5d956ebbb1 core: correctly set last error on credssp errors 2016-03-21 16:58:09 +01:00
Martin Fleisz
34a7c1860d core: Propagate credssp error code by setting last error 2016-03-21 10:23:18 +01:00
Martin Fleisz
1c2d315354 core: Add support for CredSSP version 3 2016-03-18 13:32:13 +01:00
David FORT
2cb3717d65 Fixed a typo in debug messages 2016-03-17 10:44:11 +01:00
Armin Novak
5bc333c626 Implemented GFX AVC444 support. 2016-03-16 13:43:18 +01:00
Bernhard Miklautz
228f6b116b Merge pull request #3207 from akallabeth/mic_crash_fix
Fixed error handling for channel load failures.
2016-03-16 13:03:33 +01:00
Armin Novak
059c754b0d Fixed double free. 2016-03-16 12:39:36 +01:00
Marc-André Moreau
9211f44e46 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-15 20:19:15 -04:00
Martin Fleisz
b2d24a4dd2 freerdp: Fix possible crash when setting error info in server-mode 2016-03-14 15:27:15 +01:00
Armin Novak
2dbc1a0b87 Reverted WTS API changes. 2016-03-14 13:19:08 +01:00
Armin Novak
d06723e297 Fixed return value for failed malloc. 2016-03-14 13:13:43 +01:00
Armin Novak
36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
Marc-André Moreau
3cbd7c08f7 freerdp: fix freerdp_connect possible incorrect status code 2016-03-11 14:42:16 -05:00
Martin Fleisz
66ae3f2c77 Merge pull request #3177 from akallabeth/codec_reset_fix
Fixed codec reset, now resetting resolution too.
2016-03-11 11:22:59 +01:00
David FORT
b3c0478305 Don't require HOME env var to be set for server-side code 2016-03-09 14:10:31 +01:00
Norbert Federa
de4adeff0e fix logon info processing
since there have been reports that certain windows versions send
zero values in the cbDomain field of the Logon Info Version 2
(TS_LOGON_INFO_VERSION_2) struct we allow zero values for cbUserName
and cbDomain in rdp_recv_logon_info_v1 and rdp_recv_logon_info_v2.
2016-03-04 00:45:26 +01:00
Norbert Federa
ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
David FORT
f5ce5e72dd Fix parsing of saveSessionInfo PDU
This should fix the case when no username is sent (issue #3186).
2016-03-03 11:45:12 +01:00
Armin Novak
7dcba9a663 Removed additional '\0' from TUNNEL_AUTH message. 2016-03-03 09:11:28 +01:00
Armin Novak
2e110c7f35 Fixed codec reset, now resetting resolution too.
H264 and others require the surface resolution to work properly.
This initializes the codecs and the resolution on reset.
2016-03-02 14:46:33 +01:00
Bernhard Miklautz
e02af8287e Merge pull request #3160 from akallabeth/stream_fixes
Stream fixes
2016-03-01 16:44:19 +01:00
Armin Novak
e7814d5855 Fixed stream API for Stream_Copy. 2016-03-01 12:57:48 +01:00
Bernhard Miklautz
014f31db35 Merge pull request #3171 from akallabeth/crypto_simplification
Crypto simplification
2016-02-29 17:10:53 +01:00
Armin Novak
46fa7ec481 Fixed invalid stream copy length. 2016-02-29 12:51:54 +01:00
Armin Novak
b429d230cb Refactored crypto *_New functions. 2016-02-29 09:00:02 +01:00
Armin Novak
92c15783dc Updated RC4 API, fixed crashing bug. 2016-02-28 11:19:29 +01:00
Armin Novak
238ff3b315 Unified encryption functions. 2016-02-27 23:28:49 +01:00
Armin Novak
5805ba8e52 Removed crypto_nonce. 2016-02-27 22:40:43 +01:00
Armin Novak
1036f1e296 Fixed default visibility.
When nothing is declared, only export symbols defined
with WINPR_API or FREERDP_API defined.
Override this setting if BUILD_TESTING to allow tests
access to internal functions usually not exposed.
2016-02-26 19:44:14 +01:00
Martin Fleisz
4f22682ed2 Merge pull request #3151 from akallabeth/timezone_refactor
Timezone refactor
2016-02-26 09:57:35 +01:00
Hardening
4217262680 Merge pull request #3156 from akallabeth/ssl_wrapper_merge
Ssl wrapper merge
2016-02-26 09:52:43 +01:00
Armin Novak
7a253bae42 Replaced magic numbers with defines. 2016-02-26 09:27:53 +01:00
Armin Novak
e79eee2bb1 Fixed Stream API misuse. 2016-02-25 20:01:12 +01:00
Armin Novak
b61ab5ecb7 Fixed stream copy in update_message_SurfaceCommand 2016-02-25 19:37:20 +01:00
Bernhard Miklautz
8bdad1eb93 Merge pull request #3140 from hardening/printer_work
Misc changes
2016-02-25 16:57:34 +01:00
Armin Novak
fd415cd10a Fixed missing semicolon. 2016-02-25 09:02:46 +01:00
Armin Novak
f997421098 Unified hmac functions. 2016-02-24 21:50:08 +01:00
Armin Novak
4ca6b9bf10 Unified random functions and remaining MD5. 2016-02-24 20:41:01 +01:00
Armin Novak
95058c64d1 Fixed argument checks and return values. 2016-02-24 20:16:33 +01:00
Armin Novak
ada2b16c50 Unified RC4 functions. 2016-02-24 17:04:03 +01:00
Armin Novak
06da644007 Unified md5 functions. 2016-02-24 16:46:25 +01:00
Armin Novak
0e4ea3943a Unified sha1 functions. 2016-02-24 16:36:15 +01:00
Armin Novak
447ac23aee Refactored timezone functions. 2016-02-24 09:28:30 +01:00
akallabeth
7c5fcc9ee2 Merge pull request #3149 from bmiklautz/feb22
Misc fixes
2016-02-23 20:23:52 +01:00
Bernhard Miklautz
738f55a6a8 Merge pull request #3119 from akallabeth/abort_event_reset
Resetting abortEvent only on connect and reconnect.
2016-02-23 17:14:08 +01:00
Armin Novak
d28cb6ac6a Removed function call with invalid arguments. 2016-02-23 16:32:47 +01:00
Armin Novak
24c93e4de7 Resetting abortEvent only on connect and reconnect. 2016-02-23 16:32:47 +01:00
Bernhard Miklautz
be02849ece tcp: set the timeout to 9s
Set the TCP_USER_TIMEOUT to 9s as suggested by @giox069.
See #3015 for details
2016-02-23 15:40:20 +01:00
volth
8b9c40248a Increase TCP_USER_TIMEOUT to avoid disconnections.
TCP_USER_TIMEOUT value is too small, it is only 4 seconds. 
That causes random disconnections reported in the bug report https://github.com/FreeRDP/FreeRDP/issues/2802
This patch should fix the bug report https://github.com/FreeRDP/FreeRDP/issues/2802
2016-02-23 15:40:20 +01:00
Bernhard Miklautz
e6f013eac7 fix spelling
replace occured with occurred
Fixes #3142
2016-02-22 17:01:43 +01:00
David FORT
1b2b1c4ac1 Add support for saveSessionInfo PDU
This patch adds some callbacks so that the client can have access to the informations
stored in this packet. Server-side implementation is also there, so that a server
can send these informations to the client.
2016-02-18 14:19:36 +01:00
David FORT
a53cb8190b Added missing checks 2016-02-16 22:24:51 +01:00
Martin Fleisz
56a0c4c336 Merge pull request #3097 from akallabeth/android_api_upgrade_v4
Android api upgrade and restructuring
2016-02-04 16:20:59 +01:00
Armin Novak
1b3ac98582 rdp_print_errinfo now uses INFO log level. 2016-02-04 11:41:54 +01:00
Armin Novak
cdadb58f93 Function freerdp_set_error_info fix
The public function did not wrap rdp_set_error_info.
2016-02-04 11:40:42 +01:00
Armin Novak
ad36a5c10f Disconnect log message now uses debug level. 2016-02-04 11:39:57 +01:00
Armin Novak
22f704c0a8 Fixed _socket error check. 2016-02-03 11:45:22 +01:00
Vic Lee
73f895fd55 gcc: assigned string must not be freed. 2016-02-03 13:34:58 +08:00
Armin Novak
cd05ea7452 Fixed error checks for command line parser. 2016-02-01 15:18:34 +01:00
Bernhard Miklautz
8ec39039e5 Merge pull request #3076 from akallabeth/remove_fixed_size_heap_strings
Removed fixed size strings.
2016-02-01 13:02:38 +01:00
MartinHaimberger
e83f97b64a Merge pull request #3093 from hardening/last_write_checks
Check more Stream_EnsureCapacity results when writing capabilities
2016-01-28 15:26:04 +01:00
MartinHaimberger
83b706c4be Merge pull request #3092 from akallabeth/get_build_config
Added get_build_config functions.
2016-01-28 15:23:24 +01:00
David FORT
b6dd7bbb88 Check more Stream_EnsureCapacity results when writing capabilities 2016-01-28 15:12:26 +01:00
Hardening
a2aa56ee28 Merge pull request #3067 from akallabeth/reset_abort_event
Resetting abort event on freerdp_connect.
2016-01-28 14:28:51 +01:00
Armin Novak
035f127081 Added get_build_config functions. 2016-01-28 14:26:50 +01:00
Hardening
d458bc2e06 Merge pull request #3073 from davewheel/cert_key_in_memory
Allow to specify the raw content of crypto materials
2016-01-27 10:50:38 +01:00
Hardening
7af1ec85f0 Merge pull request #3083 from akallabeth/capability_set_fix
Fix #3081, set client string encoding.
2016-01-27 10:45:54 +01:00
Armin Novak
974d2ef433 Fix #3081, client string encoding. 2016-01-27 10:34:01 +01:00
Martin Fleisz
a9e4ba0118 Merge pull request #3069 from davewheel/4upstream-1
Improve monitor support
2016-01-27 10:18:30 +01:00
David FORT
708d0cb3c0 Check server and client capabilities
Most of the capabilities are sent by both the client and the server. But for some
the specs specify that they are only supposed to be only send by the server or the client.
This patch ensures this. Without this patch a malicious client can change server settings
and a malicious server can modify client settings.
2016-01-26 16:14:48 +01:00
Armin Novak
106479d6f2 Fixed clientNameLen initialization. 2016-01-26 09:34:22 +01:00
David FORT
137825ed9f Stream_EnsureCapacity return value aren't checked in capabilities_write 2016-01-25 19:11:35 +01:00
Giovanni Panozzo
c5a4ce7893 Improve error logging after calling some BIO_ functions 2016-01-23 11:39:38 +01:00
Armin Novak
73ec3d6aca Removed fixed size strings. 2016-01-21 15:45:21 +01:00
davewheel
d5b8585a39 Allow to specify the raw content of crypto materials
Sometime it's possible that your server application doesn't have access to files
(when running in a very restricted environment for example). This patch allows
to ship the private key and certificate as a string.

Sponsored by: Wheel Systems (http://www.wheelsystems.com)
2016-01-21 11:27:06 +01:00
davewheel
121a234866 Add better handling of monitors
This patch makes FreeRDP announce the support for monitor layout PDU. It also
adds support for servers to announce the monitors layout.
2016-01-20 16:56:04 +01:00
davewheel
ca9e908f3c Fix a security issue in monitors packet handling
The number of announced monitors was not checked, so if a client was announcing
a big number, it could override other fields in settings and more...
2016-01-20 16:56:04 +01:00
Armin Novak
5542fef75d Resetting abort event on freerdp_connect. 2016-01-18 10:08:12 +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
Binyamin Sagal
23fea1615f Fix horizontal scrolling direction and capability detection 2015-12-14 21:48:31 +02:00
Armin Novak
a5db7117c8 Implemented horizontal wheel support.
Horizontal mouse wheel input capabilities are now checked
and if available mouse buttons 6 and 7 are mapped to the
horizontal wheel for the X11 client.
2015-12-14 18:29:23 +01:00
Hardening
57fe581b16 Merge pull request #2824 from bjcollins/nla_auth_exit_code
Return FREERDP_ERROR_AUTHENTICATION_FAILED on an authentication failure
2015-12-08 22:46:29 +01:00
Nito Martinez
2d5c78849e Fix formatting: else if in its own line and no brackets for single statements 2015-11-26 09:50:03 +01:00
Nito Martinez
89d8a68f4a Disable setting socket options for preexisting socket like: keepalive and tcp_nodelay, these should be set extenally if needed. Do not close the socket if the clientaddress could not be set 2015-11-25 08:36:49 +01:00
Nito Martinez
428cbd802d Fixes #2982. The idea is to be able to create the socket externally and pass that socket FD to FreeRDP so that it can be used there.
The idea suggested is to use the following interface:

settings->ServerHostname = "|"
settings->ServerPort = SocketFD
2015-11-20 02:44:35 +01:00
Bernhard Miklautz
d73c4898c1 Add build-config.h
build-config.h should contain configure/compile time settings that are
relevant for projects that use FreeRDP.

For example the compiled in plugin search paths.
2015-11-09 15:54:22 +01:00
LookBehind
95fe9ecfab Fix rdp_recv_logon_error_info
As https://msdn.microsoft.com/en-us/library/cc240641.aspx says - first is going errorNotificationType then errorNotificationData.
2015-10-20 18:05:09 +04:00
Marc-André Moreau
4ab373aced xfreerdp: fix multiple egfx context support in X11 GFX 2015-10-13 14:49:30 -04:00
Marc-André Moreau
863939fd58 Merge pull request #2919 from realjiangms/fix_allow_empty_password
Sec/NLA: Support passwordless (blank password) login with NLA.
2015-10-13 10:40:28 -04:00
zihao.jiang
a7f4685c09 Sec/NLA: Support passwordless (blank password) login with NLA.
It was supported in freerdp 1.0.2 but not supported in lastest master.
We should take empty password if it is explicitly specified with /v option.
If a password is not specified, we could first try SAM file. If the user entry does not exist, prompt for password.
2015-10-10 01:48:41 +08:00
Sriram Raghunathan
1c1e215ed9 Remove warning: HANDLE event variable unused 2015-10-05 22:42:59 +05:30
Samuel Sieb
812e14af04 Don't fail the redirect if padding wasn't sent before disconnecting 2015-09-24 10:37:21 -07:00
Hardening
62da9d28c6 Merge pull request #2899 from awakecoding/master
Standard RDP security server redirection fix
2015-09-21 23:42:32 +02:00
Marc-André Moreau
a91506161d libfreerdp-core: fix redirection with standard RDP security 2015-09-21 15:36:19 -04:00
Marc-André Moreau
d1cb3410de Merge pull request #2896 from awakecoding/master
Win32 Gateway Fix, iOS TCP connection infinite loop fix
2015-09-18 11:57:01 -04:00
Marc-André Moreau
9c35b73fb6 libfreerdp-core: fix gateway connectivity on Windows 2015-09-17 14:32:40 -04:00
Martin Fleisz
affe82cae8 Merge pull request #2890 from realjiangms/shadow_fix_memory_leak
server: Fix several memory leak found while running valgrind on freerdp-shadow
2015-09-17 10:33:43 +02:00
zihao.jiang
f21749ac07 server: Fix several memory leak while running valgrind on freerdp-shadow 2015-09-17 01:02:22 +08:00
Marc-André Moreau
48c7a8dc1d Merge pull request #2889 from dvincent-devolutions/gateway
Fix RDP8 gateway disconnections
2015-09-16 10:41:07 -04:00
Denis Vincent
3ea0fe0c01 Small corrections to BIO implementation. 2015-09-16 09:54:03 -04:00
bjcollins
ee3b39d70f Remove unnecessary variable to keep track of nlaFailure, instead just set the NLA authentication error in the callback
where it is detected.
2015-09-15 14:17:13 -05:00
bjcollins
be47c6f782 Remove unused functions from initial code to handle NLA authentication failures. 2015-09-15 14:07:14 -05:00
bjcollins
7fbc7e45a7 Clean up NLA authentication failure handling code
1. Make use of freerdp_set_last_error to set authentication failure without the helper functions
2. Rename ssl callback function
3. Break out AuthenticationOnly exit handling from bad connect handling
2015-09-15 14:07:14 -05:00
bjcollins
32a1406dc4 Return FREERDP_ERROR_AUTHENTICATION_FAILED on an authentication failure
when using NLA with xfreerdp.
2015-09-15 14:07:14 -05:00
Marc-André Moreau
3f2915eb78 libfreerdp-core: alternative RDG BIO fix 2015-09-15 13:03:11 -04:00
Marc-André Moreau
12ce635b34 libfreerdp-core: fix code style 2015-09-15 10:37:57 -04:00
MartinHaimberger
2b2af6c9ea Merge pull request #2886 from clangm/master
Fix Network Characteristics Autodetect [RDPBCGR 2.2.14]
2015-09-15 15:16:37 +02:00
Denis Vincent
6d55635ed0 libfreerdp-core: Gateway RDP8 BIO correction. Fixes connection losses. 2015-09-15 09:03:39 -04:00
MartinHaimberger
db2ce49a98 Merge pull request #2763 from akallabeth/nla_null_auth
Fixed server and client NLA state machine for NULL identity.
2015-09-15 14:53:55 +02:00
clangm
ac089f8a3f Removed if statement that was causing network characteristics autodetect to not work 2015-09-11 15:01:31 -06:00
MartinHaimberger
d971116457 Merge pull request #2765 from akallabeth/connect_abort
Connect abort and unified TCP connect
2015-09-07 10:05:24 +02:00
Armin Novak
4d77f2a4c8 Fixed CreateProcess argument initialisation. 2015-09-05 18:55:08 +02:00
Armin Novak
91d318ba7b Enable RFX for test connection, now required by sample server. 2015-09-05 17:00:27 +02:00
Armin Novak
f7a11a0ed8 Resetting abortEvent on disconnect to avoid race during connect. 2015-09-05 16:26:46 +02:00
Armin Novak
01496f474f Fixed error handling for rdp_client_connect fail. 2015-09-05 16:26:29 +02:00
Armin Novak
7d8ab23877 WSAEvent fixes ported from realjiangms pull 2870. 2015-09-05 15:18:01 +02:00
Armin Novak
188fe4ed2b Removed rdp disconnect, using unified abortEvent instead. 2015-09-05 14:57:30 +02:00
Armin Novak
3b8043264f Resetting channel error on connect. 2015-09-03 13:46:17 +02:00
Bernhard Miklautz
1f13781fe1 Merge pull request #2855 from akallabeth/memleak_fixes
Memleak fixes
2015-08-31 09:50:21 +02:00
Armin Novak
893e7a35a8 Fixed broken cleanup code. 2015-08-31 09:13:15 +02: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
Armin Novak
dd9d66a3e6 Fixed NONNULL argument warnings. 2015-08-28 10:59:48 +02:00
Armin Novak
07bba9b623 Fixed NONNULL argument warnings. 2015-08-28 10:58:20 +02:00
Armin Novak
c3a1f56f77 Resetting signals on freerdp_connect. 2015-08-27 15:53:37 +02:00
Armin Novak
fda56c0dbb Added missing NULL pointer checks. 2015-08-27 15:33:06 +02:00
Armin Novak
7ebf4879f0 Fixed uninitialised events. 2015-08-27 15:33:06 +02:00
Armin Novak
4cfd7a48cd Aborting transport layer now if requested. 2015-08-27 15:33:06 +02:00
Armin Novak
134a16d522 Fixed WSAEventSelect mode reset. 2015-08-27 15:33:06 +02:00
Armin Novak
1cbeb10074 Added unit test for freerdp_connect
* Tests connection to not existing host (timeout)
* Tests connection to not exising host with abort.
* Tests connection to sfreerdp-server on localhost.
2015-08-27 15:33:06 +02:00
Armin Novak
e6c23cb534 Implemented Async TCP connect with abort event
* Implemented unified freerdp_tcp_connect_timeout with connect abort.
* Implemented unified freerdp_tcp_connect_multi with connect abort.
* Added connect abort to freerdp_tcp_connect.
* Added freerdp_abort_connect and abortEvent.
2015-08-27 15:33:06 +02:00
Marc-André Moreau
223e0c7900 Merge pull request #2785 from MartinHaimberger/mh-channel-fix
Channel hardening and fixing
2015-08-27 09:24:10 -04:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Vic Lee
6f639c1e34 gcc: read and write desktop scale settings in core data. 2015-08-27 16:19:40 +08:00
Vic Lee
8394d8c677 gcc: read and write monitor extended data. 2015-08-27 15:26:37 +08:00
Martin Haimberger
420a86e1c7 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/drdynvc/client/drdynvc_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	client/X11/xf_gfx.c
2015-08-25 00:07:04 -07:00
Marc-André Moreau
d7329194fc Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-08-04 11:55:38 -04:00
Martin Haimberger
2862109337 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/smartcard/client/smartcard_main.c
	channels/smartcard/client/smartcard_operations.c
2015-07-30 07:29:12 -07:00
Bernhard Miklautz
a22dc21c15 remdesk,encomps: misc fixes
* only free stream when an error occurs
* ignore unhanded messages instead of throwing an error
* fix memory leak in settings
2015-07-29 17:32:09 +02:00
Clive Stevens
99228ee254 Fix race condition in freerdp_channels_client_load
If g_pInterface is set to NULL outside the critical section in one thread
while another thread is in the critical section, the channel client context
allocated in the VirtualChannelEntry won't end up getting freed.

The channel client context is normally loaded from g_pInterface in
FreeRDP_VirtualChannelInit and stored in the pChannelInitData, then copied
from there onto the pChannelOpenData structure in FreeRDP_VirtualChannelOpen
and finally freed in freerdp_channels_free.
2015-07-29 14:26:33 +01:00
Marc-André Moreau
5cb06ecc68 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-07-28 09:21:33 -04:00
Bernhard Miklautz
a342d40158 core/listner: fix possible problem in _free 2015-07-27 11:24:21 +02:00
Bernhard Miklautz
458d3b1593 transport: fix regression introduced with PR #2770
When the event is reset in transport_check_fds xfreerdp doesn't work and
consumes 100% CPU (see #2790). On windows this is require otherwise the
CPU consumption is 100% there.
This quick fix only resets the event on windows. It's a working approach
but definitely not the final solution.
2015-07-17 12:06:41 +02:00
Vic Lee
042cb250f3 Merge pull request #2770 from akallabeth/bio_event_reset
Resetting frontBio after read now.
2015-07-16 06:57:46 -07:00
Martin Haimberger
6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
Bernhard Miklautz
68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
098eda9873 Error checks for BIO_get_event
ResetEvent before reading data from transport BIO.
2015-07-09 12:20:22 +02:00
Armin Novak
18cea1c9ba Replaced cbMaxSignature with cbSecurityTrailer
The token buffer size during authentication was constructed
from the wrong buffer size. These sizes are equal in case of
local account logins but differ with domain accounts.
2015-07-09 10:09:18 +02:00
Armin Novak
ecf6ffdcce Fixed CompleteAuthToken return check. 2015-07-09 09:57:45 +02:00
Armin Novak
cb01e540ba Fixed CompleteAuthToken return check. 2015-07-09 09:49:12 +02:00
Armin Novak
2fe5ecfc1b Fixed wrong output in log messages. 2015-07-08 17:41:23 +02:00
Martin Fleisz
9a2d33af12 Fixed missing encrypt / decrypt success check.
The return of EncryptMessage and DecryptMessage was unchecked.
This lead to PLAINTEXT to be sent over the wire, a major security
issue.
2015-07-08 17:41:23 +02:00
Armin Novak
48ccf73a36 More SSPI logging. 2015-07-08 17:41:22 +02:00
Armin Novak
5b0ee9b7ab Error checks and readable log messages. 2015-07-08 17:41:22 +02:00
Martin Fleisz
3b87cc0c07 Fixed server and client NLA state machine.
When using NULL credentials (current context)
the server state machine did not send back the
required authentication token.
On client side erroneous checks prevented sending
the appropriate public key.
2015-07-08 17:41:21 +02:00
Armin Novak
0120ee75ca Resetting frontBio after read now. 2015-07-07 14:48:27 +02:00
Armin Novak
d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Hardening
ac93b26ba8 Merge pull request #2750 from realjiangms/fix_win32_wsaevent
Fix event created for WSAEventSelect
2015-07-02 09:26:13 +02:00
Armin Novak
3a9db563fd NLA: Fixed length check. 2015-07-01 16:05:11 +02:00
Armin Novak
8479c824fd Fixed handling of optional TSPasswordCreds field. 2015-07-01 15:30:38 +02:00
Armin Novak
6c0e1af4af NLA decrypt credentials fixed. 2015-07-01 14:31:55 +02:00
zihao.jiang
75407edf37 Fix event created for WSAEventSelect: The event we pass to WSAEventSelect should be WSAEVENT instead of normal event.
From MSDN, it looks same as CreateEvent(NULL, FALSE, FALSE, NULL):
	The WSACreateEvent function creates a manual-reset event object with an initial state of nonsignaled. The event object is unnamed.
However they are not really equivalent. When we use normal event, the WSAEventSelect still works but the event appears to be 'auto-reset'.
2015-07-01 01:52:59 +08:00
Marc-André Moreau
161359f6ec libfreerdp-core: fix receiving of logon error info during capability exchange 2015-06-29 12:43:18 -04:00
Bernhard Miklautz
1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Norbert Federa
20878e50fe Merge pull request #2724 from bmiklautz/leak_fix
Fix leaks in certificate and identity handling
2015-06-26 15:30:00 +02:00
Bernhard Miklautz
77ef5a80de nla: clear identity memory before releasing 2015-06-26 15:12:33 +02:00
Norbert Federa
ac95b7274e Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
2015-06-26 15:01:08 +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
Hardening
b411c11f6e Merge pull request #2729 from akallabeth/win_reg_key_by_vendor_product_define
Replaced hard coded registry keys with cmake defines.
2015-06-26 11:15:09 +02:00
Bernhard Miklautz
28e63786cd Integrate pull request feedback
Use while instead of for with additional variable where appropriate.
2015-06-25 10:33:54 +02:00
Armin Novak
e8bfa29bd2 Replaced registry keys with cmake defines. 2015-06-24 14:02:48 +02:00
Bernhard Miklautz
9f6fa7ef4c Fix possible endless loops on cleanup.
Some cleanup code possibly create endless loops because an unsigned
type was used as run variable but the check was >= 0 in the for loop.
2015-06-24 12:26:13 +02:00
Armin Novak
ee221315db Fixed loop condition. 2015-06-24 10:08:04 +02:00
Armin Novak
6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Bernhard Miklautz
2e87d0ee52 Fix leaks in certificate and identity handling 2015-06-23 15:40:37 +02:00
Armin Novak
24fed46cda Fixed grabage return value. 2015-06-23 12:08:47 +02:00
Armin Novak
212db120e0 Fixed NULL pointer dereference. 2015-06-23 12:07:38 +02:00
Bernhard Miklautz
ff8d172a12 core: use error instead of debug
When the function would return with an error print an error message
instead of a debug message
2015-06-23 11:15:13 +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
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
77927c213e android: fix misc compiler warnings
with gcc version arm-linux-androideabi-gcc (GCC) 4.8
2015-06-22 19:09:59 +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
Marc-André Moreau
3b3ffce042 Merge pull request #2705 from akallabeth/sspi_fix_v2
Sspi fix v2 - Fixes static build
2015-06-22 10:19:22 -04:00
Marc-André Moreau
9aabec73f5 Merge pull request #2713 from bmiklautz/divbyzero
core/metrics: prevent division by zero
2015-06-22 08:53:36 -04:00
Marc-André Moreau
1e39d7728c Merge pull request #2702 from akallabeth/nla_null_identity_support
NLA Use current users credentials if none provided.
2015-06-22 08:53:05 -04:00
Bernhard Miklautz
41ef7ca17c core/metrics: prevent division by zero 2015-06-19 17:21:16 +02:00
Norbert Federa
91a9b23b91 core: message channel pdu broken with rdp security
rdp_recv_message_channel_pdu always read the rdp security header
even if it was already previously read (which is the case if rdp
security is active)

This caused malfunctions and disconnects when heartbeat or bandwidth
autodetect packets were sent/received in rdp security mode.

Credit goes to @MartinHaimberger for identifying the broken code
part.
2015-06-19 14:49:17 +02:00
Martin Haimberger
6e4e1c2773 Merge remote-tracking branch 'upstream/master' into mh-stream-fix
Conflicts:
	client/Windows/wf_cliprdr.c
2015-06-18 03:06:40 -07:00
Martin Haimberger
d06da4f1bd hardend drdynvc channel 2015-06-18 03:04:28 -07:00
Vic Lee
2e11eac79a Merge pull request #2675 from akallabeth/path_make_path
Added PathMakePath function.
2015-06-18 02:43:47 +00:00
Armin Novak
3c329aa207 Using InitSecurityInterfaceEx(0) now. 2015-06-17 13:23:44 +02:00
Armin Novak
34253f2664 Let SSPI module choose which implementation to use. 2015-06-15 15:21:21 +02:00
Armin Novak
219ca1c02b NLA identity now a pointer, allowing NULL.
When NLA identity is NULL, the current user context
is used on windows.
2015-06-15 15:03:13 +02:00
Vic Lee
145fc10412 Merge pull request #2687 from akallabeth/known_hosts_v2
Store SSL fingerprints with host and port
2015-06-12 12:52:53 +00:00
Armin Novak
acc96388a5 Added certificate_get_fingerprint function to read out old one. 2015-06-11 09:14:15 +02:00
Vic Lee
d75ac1ec12 autodetect: use high-precision timer. 2015-06-11 15:12:27 +08:00
Armin Novak
5b7a44cd4a Removed CreateDirectoryA, handled by PathMakePath 2015-06-09 13:17:15 +02:00
Armin Novak
6b4cc2ff25 Fixed size of string buffer. 2015-06-02 12:45:35 +02:00
Armin Novak
ea1dae219d Added config compatibility for default builds. 2015-06-02 12:00:52 +02:00
Armin Novak
d3a88014da Fixed directory creation checks. 2015-06-02 10:01:10 +02:00
Armin Novak
dd1a03191d Fixed settings path creation. 2015-06-02 09:51:05 +02:00
Armin Novak
8f68b9c261 Using vendor/product scheme for settings now. 2015-06-02 09:50:53 +02:00
Hardening
29de9b6d4e Merge pull request #2658 from hardening/fix_2657
Fix for #2657
2015-05-29 17:58:30 +02:00
David FORT
84ae1d1cfb Take in account nfedera's remarks 2015-05-29 14:24:14 +02:00
David FORT
a9709a62cc Check some return values 2015-05-29 14:24:14 +02:00
David FORT
909a965fe9 Added misc checks in rdg.c 2015-05-29 14:24:14 +02:00
David FORT
d26ce6971c Fixed nfedera's remarks 2015-05-29 14:24:14 +02:00
David FORT
12f873f1f9 Fixed MessageQueue and callers 2015-05-29 14:24:14 +02:00
Hardening
4586450e27 Merge pull request #2661 from MartinHaimberger/mh-stream-fix
stream: check stream_new in winpr and libfreerdp
2015-05-29 14:12:59 +02:00
Martin Haimberger
951a2d2210 stream: check stream_new in winpr and libfreerdp
also fixed a few things
2015-05-29 04:46:50 -07:00
Hardening
2ec3734607 Merge pull request #2659 from oshogbo/unused
Remove unused variable.
2015-05-28 22:57:17 +02:00
ivan-83
307d22ca11 * debug and error messages now print function name and line number
* add debug messages to trace fake network dissconects
2015-05-27 23:48:07 +03:00
ivan-83
3912172fc8 + 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 23:22:36 +03:00
ivan-83
5ba4d6cd6c Code style changed. 2015-05-27 22:59:57 +03:00
ivan-83
0fda0eb0de Code style changed. 2015-05-27 22:59:57 +03:00
ivan-83
1009268158 * debug and error messages now print function name and line number
* add debug messages to trace fake network dissconects
2015-05-27 22:57:10 +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
Mariusz Zaborski
461497b8a5 Remove unused variable. 2015-05-27 16:04:06 +02:00
David FORT
85c350f5da Fix for #2657 2015-05-27 15:13:43 +02:00
Mariusz Zaborski
951dbd88de In c file the name is channelId. 2015-05-26 16:12:41 +02:00
Hardening
58b1995619 Merge pull request #2654 from oshogbo/typos
Typo
2015-05-26 16:10:41 +02:00
Marc-André Moreau
36cb1e6dc9 Merge pull request #2639 from awakecoding/master
WLog, server-side rdpdr, remote assistance, byteswap, etc
2015-05-22 14:30:11 -04:00
Marc-André Moreau
35e26020aa freerdp: patch multiple leaks and OOM errors 2015-05-22 14:14:57 -04:00
Bernhard Miklautz
7a1485a2e4 Merge pull request #2638 from kwitaszczyk/master
Assign peer to settings when a new RDP module is being initialized.
2015-05-22 13:36:00 +02:00