Commit Graph

2062 Commits

Author SHA1 Message Date
akallabeth
e3e65734e8
Merge pull request #4303 from krisztian-kovacs-balabit/use-redirection-password
Use redirection password
2017-12-20 17:01:58 +01:00
Martin Fleisz
80a49f46dc
Merge pull request #4320 from ondrejholy/coverity-fixes
Coverity Scan fixes
2017-12-20 14:17:20 +01:00
Martin Fleisz
ec027bf46c
Merge pull request #4318 from hardening/display_improvement
Dynamic resolution improvements
2017-12-20 13:43:22 +01:00
Martin Fleisz
bfe8359b5b
Merge pull request #4239 from akallabeth/test_memleak_fixes
Test memleak fixes
2017-12-20 12:38:38 +01:00
David Fort
2a6c9e1b87 Add an activated event and a Timer event
Added an event that is triggered when the activation sequence is finished.
We also define a timer event that is neat to have for regular operation.
2017-12-19 15:21:15 +01:00
Ondrej Holy
4791970c09 core: Remove redundant stream position changes
Stream_Seek() is used, but consequently Stream_SetPosition() is used
for position obtained by Stream_GetPosition() immediatelly before
Stream_Seek(). Let's remove this stream position changes due to its
redundancy.
2017-12-19 13:02:55 +01:00
Ondrej Holy
0389cb129e core: Fix array overrunning during FIPS keys generation
p is 20 and r is 1 in the last iteration of fips_expand_key_bits,
which means that buf[21] is read (of BYTE buf[21];). However,
the value is not needed, because it is consequently discarded by
"c & 0xfe" statement. Let's do not read buf[p + 1] when r is 1
to avoid this.
2017-12-19 10:29:16 +01:00
Armin Novak
7305828122 Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
David Fort
41823080f9 Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
David Fort
11ee81be60 Fix XRandr for old systems and MacOSX
We need a recent enough version of XRandr to correctly detect monitor.
Also this patch adds some typo or style fixes.
2017-12-08 10:59:38 +01:00
KOVACS Krisztian
7f5f40d392 core/nla: use RedirectionPassword if set in settings
Previously, the code prompted for the password even if a RedirectionPassword
was provided.

With this change the prompt is only shown if both settins->Password and
settings->RedirectionPassword is absent.
2017-12-06 16:32:56 +01:00
KOVACS Krisztian
6518e36c70 Revert "core/connection: use redirection password when reconnecting"
This reverts commit 70c65e70d1.
2017-12-06 14:58:34 +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
Armin Novak
3e4c274cc9 Fixed channel count exceed checks
The check aborted on CHANNEL_MAX_COUNT - 1 instead
of correctly at CHANNEL_MAX_COUNT
2017-11-28 09:40:04 +01:00
David Fort
2f4a2f8595
Merge pull request #4272 from akallabeth/static_channel_checks
Fix #3378: 31 static channels are supported.
2017-11-27 22:46:23 +01:00
Armin Novak
2cc64298f2 Fix #4281: Added option to prefer IPv6 over IPv4 2017-11-27 11:43:54 +01:00
Armin Novak
377bfeb227 Fix #3378: 31 static channels are supported. 2017-11-23 16:18:44 +01:00
Armin Novak
f68bc07a22 Fixed return value check for callbacks. 2017-11-23 15:10:42 +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
74bbbdb5c3 Remove unused variable
Unused variable was added together with FIPS mode support, let's remove it.
2017-11-23 10:09:17 +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
David Fort
a834ef8243
Merge pull request #4251 from akallabeth/openssl_warn_fixes
Fix #4247: warnings introduced with #3904
2017-11-23 09:22:02 +01:00
cedrozor
49f4b2a42e Fixed NLA for Negotiate and NTLM authentication (regression due to the recent addition of kerberos support) 2017-11-21 16:36:47 +01:00
Armin Novak
a376656b3c Disabled ceritficate signature check. 2017-11-21 11:37:42 +01:00
Armin Novak
4fe12b0ea3 Fix #4247: warnings introduced with #3904 2017-11-20 10:18:15 +01:00
akallabeth
b156b937fe
Merge pull request #3904 from bjcollins/master
FIPS Mode support for xfreerdp
2017-11-17 13:31:43 +01:00
Martin Fleisz
4ff1251488
Merge pull request #4236 from akallabeth/scan_fix_remastered
Scanbuild warning fixes
2017-11-17 13:02:46 +01:00
Brent Collins
9ca9df1ead Make the new winpr_Digest*MD5_Allow_FIPS functions more generic to no longer be MD5 specific in design. This way the FIPS override
could easily be extended to more digests in the future. For now, an attempt to use these functions with anything other than MD5 will
not work.
2017-11-17 12:43:07 +01:00
Brent Collins
e47123f05a Do not initialize SSL in freerdp_context_new, it is too early to detect the fips enabled flag
and is redundant since it is initialized later before actually using SSL.
2017-11-17 12:43:07 +01:00
Brent Collins
68ab485e63 Fix logic error in reworked MD5 call for establishing keys, and fix some minor whitespace issues. 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
bd7e4cd35a Fixed uninitialized variables. 2017-11-15 15:56:25 +01:00
Armin Novak
032c0164d1 Fixed missing error check. 2017-11-15 15:56:25 +01:00
Armin Novak
99f6c27488 Fixed uninitialized arguments. 2017-11-15 15:56:25 +01:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
David Fort
7bbc3cb8b7 Fix logic in nla_read_ts_credentials 2017-11-13 16:20:57 +01:00
dodo040
e0a9999fb2 fix: GSS API init, enterprise name management, variable names and format code 2017-11-13 16:20:56 +01:00
dodo040
0a3c61d305 fix undefined symbol references at linking stage 2017-11-13 16:20:56 +01:00
dodo040
b81f168f0e initial commit for kerberos support 2017-11-13 16:20:55 +01:00
akallabeth
fcc9419922
Merge pull request #4225 from krisztian-kovacs-balabit/use-redirection-pdu-password-on-reconnect
core/connection: use redirection password when reconnecting
2017-11-10 09:32:39 +01:00
KOVACS Krisztian
c13c9035eb libfreerdp/core/certificate: open key file for reading only
There's no point in writing the key file for read-write, and it makes it
impossible to run the shadow server with the key file being read only.
2017-11-09 16:54:22 +01:00
KOVACS Krisztian
70c65e70d1 core/connection: use redirection password when reconnecting
According to MS-RDPBCGR the server might send a password in the Redirection PDU
that then must be sent by the client to the server as password.

Since the field either contains a password string (unicode) or a binary cookie,
we try to convert the password from unicode and use it only if conversion
succeeds.
2017-11-09 14:46:38 +01:00
Martin Fleisz
d5344c3396
Merge pull request #4219 from akallabeth/various_fixes
Various fixes
2017-11-09 09:37:18 +01:00
Martin Fleisz
ed1934cafe
Merge pull request #4211 from akallabeth/silence_duplicate_warnings
Silence WLog_ERR messages if last error is set.
2017-11-08 13:34:26 +01:00
Armin Novak
b86c0ba548 Fixed NLA default error to FREERDP_ERROR_AUTHENTICATION_FAILED 2017-11-08 11:32:34 +01:00
David Fort
b216e91cdd
Merge pull request #4210 from akallabeth/nla_errors_extended
Added additional NLA error mappings.
2017-11-06 14:23:50 +01:00
Armin Novak
ce00f4dd8f Silence WLog_ERR messages if last error is set. 2017-11-06 14:02:22 +01:00
akallabeth
e7b8833e9e
Merge pull request #4187 from hardening/multimon_fix
Multimonitor fix
2017-11-06 10:02:07 +01:00
Armin Novak
7a73a0eb1b Added additional NLA error mappings. 2017-11-06 09:49:03 +01:00
Youness Alaoui
02e4f1f256 Do not delete the listener socket right after creating it.
The listener server socket file needs to be deleted before we bind it
otherwise it's an "address already in use" error. But it was getting
deleted after the bind, causing the file to disappear, and preventing
anyone from connecting to the listener socket since the socket stops
existing.

This is caused by commit 884e87fde4
2017-10-27 15:01:29 -04:00
Armin Novak
367bddd7ad Added better error mapping for NEGO results. 2017-10-25 09:58:13 +02:00
David Fort
f90fe19fc7 multimon: correctly set the primary monitor
According to the spec the primary monitor is supposed to be in (0,0) and other monitors
to be given relative to this one.
2017-10-17 14:07:23 +02:00
David Fort
a132922376 Add checks for DR channel 2017-10-04 10:30:47 +02:00
akallabeth
e6d66d9d81 Merge pull request #4154 from hardening/misc_fixes
Fix raw surfaces displaying + misc other changes
2017-09-27 14:56:21 +02:00
Bernhard Miklautz
15c7cb8cb2 Enable clipboard channel per default 2017-09-27 09:45:07 +02:00
David Fort
ddca8f3a3b Check return value of malloc 2017-09-26 13:56:08 +02:00
Armin Novak
9f26f73709 Added delay for connect abort
The connection abort must be called after freerdp_connect.
Ensure that this function is already running by waiting
a second.
2017-09-26 12:05:24 +02:00
Armin Novak
ef9444bd35 TestConnect: Extend timeout, only listen locally 2017-09-26 10:59:34 +02:00
Armin Novak
ac454628ae Fixed TestConnect with dynamic channels. 2017-09-25 13:34:00 +02:00
Armin Novak
884e87fde4 Unlink file after binding to it.
When unlinking the file before binding, a new entry is created
in the file system after binding. This is not desireable, so
unlink it after binding to remove the temporary file after the process
closes.
2017-09-25 10:35:24 +02:00
Jukka-Pekka Virtanen
ad1425e145 Using PasswordIsSmartcardPin option when sending TS_INFO_PACKET 2017-09-23 14:28:17 +02:00
David Fort
b587daa416 Merge pull request #4136 from tditsch/master
Fixed endless loop when RDP Server sends SERVER_DENIED_CONNECTION
2017-09-22 09:52:27 +02:00
Armin Novak
bdae339268 Check and invalidate handles on free. 2017-09-19 12:36:13 +02:00
tditsch
a16d9a2ade refactored Bugfix 2017-09-19 10:18:41 +02:00
tditsch
feca6d9750 Fixed endless loop when RDP Server sends SERVER_DENIED_CONNECTION 2017-09-18 17:29:16 +02:00
Ondrej Holy
9cccd4888d orders: Fix OFFSCREEN_DELETE_LIST allocation size
The size of OFFSCREEN_DELETE_LIST list allocation was incorrectly changed
by commit 99b1481 and consequently fixed incorrectly by commit 8a0fe086.
Let's count the allocation size based on new size and not based on current
size in order to prevent some memory issues.

https://github.com/FreeRDP/FreeRDP/issues/4117
2017-09-07 09:38:44 +02:00
Ondrej Holy
048e7f264b orders: Fix ORDER_TYPE_GDIPLUS_END check
Commit 6fd03ab introduced security checks for orders, but
ORDER_TYPE_GDIPLUS_END check fails in case of success and vice versa.
Let's add the missing question mark.

https://github.com/FreeRDP/FreeRDP/issues/4117
2017-09-07 09:38:44 +02:00
David Fort
5115ecd948 Merge pull request #4063 from akallabeth/auth_fixes
Fixed leaks, certificate comparison and channel context cleanup
2017-08-30 10:19:12 +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
David Fort
b29658a859 Merge pull request #4066 from akallabeth/input_event_fixes
Fixed capability checks for mouse and unicode input.
2017-08-02 11:25:08 +02:00
David Fort
c84065f40c Merge pull request #4069 from yurashek/master
Build on Solaris
2017-08-02 09:53:38 +02:00
Armin Novak
d2d621106d Fixed capability checks for mouse and unicode input. 2017-07-31 12:30:35 +02:00
Armin Novak
523a881663 Channels with a context must free it themselves. 2017-07-28 08:39:51 +02:00
Armin Novak
11fa9f6753 Free credentials on exit. 2017-07-28 08:39:49 +02:00
Armin Novak
b0411d4faa Unexported internal NLA functions. 2017-07-28 08:38:07 +02:00
Armin Novak
c301f2d56a Fixed certificate check return. 2017-07-28 08:35:41 +02:00
Armin Novak
ceda244165 Fixed uninitialized values and leaks. 2017-07-28 08:35:31 +02:00
Armin Novak
dd4b5ea126 Disable JPEG codec support if not compiled in. 2017-07-24 15:23:36 +02:00
Armin Novak
b51a103b70 Fixed uninitialized values. 2017-07-20 09:35:41 +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
Armin Novak
8292b4558f Fix TALOS issues
Fix the following issues identified by the CISCO TALOS project:
 * TALOS-2017-0336 CVE-2017-2834
 * TALOS-2017-0337 CVE-2017-2834
 * TALOS-2017-0338 CVE-2017-2836
 * TALOS-2017-0339 CVE-2017-2837
 * TALOS-2017-0340 CVE-2017-2838
 * TALOS-2017-0341 CVE-2017-2839
2017-07-20 09:28:47 +02:00
Armin Novak
96d53933d2 Deactivated all H264 related code paths. 2017-07-17 10:39:08 +02:00
Norbert Federa
36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00
Bernhard Miklautz
e7cd3250c3 Fix a regression introduced with PR #4013
If numWindowRects/numVisibilityRects is zero a realloc might either
return NULL or a free able memory. In the first case the introduced
regression caused a double free.
As 0 is a possible value that can be received in both cases rail was
broken.

Fixes #4022
2017-06-29 11:28:03 +02:00
weizhenwei
ef540ee2df code format adjustment 2017-06-23 09:50:56 +08:00
weizhenwei
5d8d3b53c5 remove redundant NULL pointer check 2017-06-23 09:44:40 +08:00
weizhenwei
3b52a60d31 remove useless NULL pointer check before free 2017-06-23 09:21:16 +08:00
weizhenwei
61b24bf0b3 add NULL pointer check and set freed pointers to NULL afterward 2017-06-22 17:53:51 +08:00
weizhenwei
fa1c65b656 refactor to remove duplicate code and replace free+malloc with realloc 2017-06-22 10:21:20 +08:00
weizhenwei
2d56e22e9e refactor on redundant code copy 2017-06-21 22:07:07 +08:00
weizhenwei
d77802d5e9 fix memroy leak of window_icon->iconInfo at update_read_window_icon_order() 2017-06-21 15:26:28 +08:00
weizhenwei
2f96df25fa fix memory leak at update->window->window_state.windowRects/visibilityRects at update_read_window_state_order() 2017-06-21 15:26:28 +08:00
weizhenwei
5c19318ab5 fix memory leak at update->window->window_state.titleInfo.string at update_read_window_state_order() 2017-06-21 15:26:28 +08:00
weizhenwei
6a43fdc71a code clean on free(update->window->monitored_desktop.windowIds); 2017-06-21 15:26:27 +08:00
weizhenwei
63c81517b7 fix memory leak on update->window->monitored_desktop.windowIds which is realloced at update_read_desktop_actively_monitored_order() 2017-06-21 15:26:27 +08:00
Armin Novak
22f1fbe3d2 Fixed missing external declaration (#3982) 2017-05-31 11:44:33 +02:00
Jura Sasek
4edb5cf7e6 Build for Solaris 2017-05-24 04:27:01 -07:00
David Fort
b92a789dfd Merge pull request #3963 from akallabeth/qoe_ack
Added client RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU
2017-05-22 11:10:03 +02:00
David Fort
ee8ae987bf Merge pull request #3967 from akallabeth/sec_encrypt_fix
SEC_ENCRYPT check in rdp_client_connect_auto_detect
2017-05-22 11:08:32 +02:00
davewheel
4bfb4dddbf Add a callback to provide NTLM hashes on server-side
Adds a callback that allows servers to compute NTLM hashes by themselves. The typical
use of this callback is to provide a function that gives precomputed hash values.

Sponsored by: Wheel Systems (http://www.wheelsystems.com)
2017-05-18 14:24:24 +02:00
Armin Novak
f414522b7a Added setting for QoeAck. 2017-05-18 14:07:09 +02:00
Armin Novak
8904c15cc9 Fixed missing state reset. 2017-05-17 15:58:44 +02:00
Armin Novak
8c52dcbdc2 SEC_ENCRYPT check in rdp_client_connect_auto_detect
Fix by @wizwizaco for #3951
2017-05-15 13:10:10 +02:00
David Fort
17a4e95a5b Drop some annoying warning
Probably that some unused functions should be removed, but at least it makes
it compile with no warnings.
2017-05-12 13:54:16 +02:00
Armin Novak
b1d631f1e5 Added support for Set Keyboard IME Status 2017-05-12 09:43:58 +02:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Armin Novak
9f9254504e Fixed leak of client random. 2017-03-28 14:33:02 +02:00
Armin Novak
d46d0c3d4a Fixed invalid return from xf_rail_window_icon 2017-03-28 11:47:46 +02:00
David Fort
b0b3a78a20 Store client_random in server mode
We need the client_random in server mode when the client does RDP security and
tries to reconnect using the cookie.
2017-03-21 10:32:17 +01:00
David Fort
716eab2405 Add more RAIL option flags 2017-03-10 10:36:26 +01:00
David Fort
7b61dbdd0f Don't forget to send the RAIL capabilities in server mode 2017-03-09 23:15:49 +01:00
Norbert Federa
f77b4a57dc Merge pull request #3796 from akallabeth/scan_warning_fixes_v2
Scan warning fixes v2
2017-03-03 14:41:11 +01:00
Armin Novak
88b6ff00d9 Fixed argument checks, formatting. 2017-03-03 14:11:28 +01:00
Armin Novak
99c45405cb Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01: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
Armin Novak
d119745d97 String representation of logon_error_info 2017-03-02 18:09:51 +01:00
David Fort
815c97efb2 The LongCredentials capability were not parsed or used 2017-03-02 00:39:08 +01:00
David Fort
67607ce916 Take in account and set the LogonNotify flag
This flag was not read in the server case and was always sent in the
case of a client.
2017-03-02 00:29:48 +01:00
David Fort
5bb7a05026 Merge pull request #3823 from akallabeth/ssl_error_check_fix
Fixed SSL error checks in transport_ssl_cb
2017-03-01 11:21:41 +01:00
Armin Novak
e455cc1745 Fixed SSL error checks in transport_ssl_cb
Fix error define use. The callback is called from
ssl3_dispatch_alert or dtls1_dispatch_alert where the alert define
is left shifted by 8. Additionally ignore close notifcation. (#3814)
2017-03-01 10:46:00 +01:00
Armin Novak
b11de26f98 Fixed GetComputerNameExA return checks. 2017-02-27 11:49:53 +01:00
akallabeth
8a22052b61 Fixed memory leaks. 2017-02-25 08:35:37 +01:00
akallabeth
705c0c1e12 Fixed GetComputerNameExA calls. #3815 2017-02-24 21:58:08 +01:00
Norbert Federa
689d2696d2 Merge pull request #3800 from mfleisz/channel_fixes
Cleanup channel structs in channels_close to allow instance reuse
2017-02-24 13:25:52 +01:00
akallabeth
7ce1dd0a6c Merge pull request #3791 from akallabeth/kerberos
Kerberos (Rebased #3417)
2017-02-23 13:46:34 +01:00
Armin Novak
b905e0c26d Fixed initialisation of kerberos context. 2017-02-23 11:06:47 +01:00
Martin Fleisz
eeae688ed3 core: Cleanup channel structs in close to allow instance reuse 2017-02-22 13:45:25 +01:00
Armin Novak
70baa6fe26 Added additional connect errors. 2017-02-22 09:50:59 +01:00
Armin Novak
363109c581 Using preloaded logger. 2017-02-22 09:42:56 +01:00
Armin Novak
1497b5654e Using SSL defines instead of magic numbers. 2017-02-22 09:34:20 +01:00
David Fort
7b437178bb Add a ClientCapabilities callback
This callback is called when the client capabilities have been received. This callback
appears to be more useful than the Capabilities one that is called just before the server
sends its capabilities.
2017-02-21 23:44:47 +01:00
David Fort
6894ed3af6 Dropped some warnings and fix code style
Dropped some warning that were caused by the DEBUG_CAPABILTIES define.
Also adjusted some lines that were quite ugly after the automatic truncation
to 80 characters.
2017-02-21 23:00:41 +01:00
Norbert Federa
43a4903e3d Merge pull request #3795 from hardening/monitor_limit
Limit the number of client announced monitors
2017-02-21 17:35:57 +01:00
David Fort
59dafc2573 Added the spec reference for the 16 monitors limit 2017-02-21 15:03:00 +01:00
Martin Fleisz
0ed0ecb397 Merge pull request #3789 from akallabeth/scan_warning_fixes
Scanbuild warning and error fixes
2017-02-21 11:07:57 +01:00
David Fort
837491ba24 Limit the number of client announced monitors
The specs says that only 16 are allowed, so let's make that limitation a
reality.
2017-02-21 11:02:12 +01:00
Armin Novak
50cd702a15 Updated KRB5 detection, added error case handler
* Linking against KRB5 library now, no dynamic usage.
* Added proper CMake detection script for KRB5 detection
* Added some additional error conditions.
2017-02-21 10:54:34 +01:00
HenryJacques
56c0219907 Update transport.c 2017-02-20 16:04:33 +01:00
HenryJacques
56d6c2396e Update errconnect.c 2017-02-20 15:59:56 +01:00
Armin Novak
a1003ab6f0 Fixed scanbuild warnings. 2017-02-20 14:12:39 +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
Armin Novak
c249705085 Fixed scanbuild warnings. 2017-02-20 13:45:19 +01:00
Volth
c333aa359f Add command line option to override action script path 2017-02-17 13:09:32 +00:00
Armin Novak
f8d22c00d6 Fixed compiler warnings and uninitialized data. 2017-02-17 11:17:45 +01:00
Armin Novak
bee73adc5b Replaced random() with winpr_RAND 2017-02-17 10:59:22 +01:00
Armin Novak
8bffcad7b8 Replaced snprintf with _snprintf. 2017-02-17 10:56:16 +01:00
Martin Fleisz
68a9408249 core: Get rid of useless settings copy 2017-02-15 14:59:24 +01:00
David Fort
4e0003533e Parses the SupportStatusInfoPdu early capability and send it to clients if supported 2017-02-09 11:50:46 +01:00
Volth
e7487cea27 Add command line option to override action script path 2017-02-08 08:30:24 +00:00
Ilya Shipitsin
12f5368819 make cppcheck even more happier:
[channels/tsmf/client/gstreamer/tsmf_X11.c:317] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:322]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:470] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/tsmf_media.c:179] -> [channels/tsmf/client/tsmf_media.c:181]: (warning) Either the condition '!stream' is redundant or there is possible null pointer dereference: stream.
[client/Windows/wf_cliprdr.c:2219] -> [client/Windows/wf_cliprdr.c:2222]: (warning) Either the condition '!formatDataResponse' is redundant or there is possible null pointer dereference: formatDataResponse
[client/Windows/wf_cliprdr.c:2445] -> [client/Windows/wf_cliprdr.c:2448]: (warning) Either the condition '!fileContentsResponse' is redundant or there is possible null pointer dereference: fileContentsResponse.
[client/X11/xf_cliprdr.c:911] -> [client/X11/xf_cliprdr.c:913]: (warning) Either the condition '!clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/X11/xf_graphics.c:504] -> [client/X11/xf_graphics.c:506]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[libfreerdp/core/transport.c:861] -> [libfreerdp/core/transport.c:863]: (warning) Either the condition '!transport' is redundant or there is possible null pointer dereference: transport.
[server/shadow/shadow_server.c:777] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:778] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:779] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:781] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:782] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:783] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:784] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:785] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:787] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:789] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
2017-01-26 14:44:19 +05:00
Bernhard Miklautz
924a84b324 Merge pull request #3708 from akallabeth/termination_fixes
Client channel shutdown fixes
2017-01-23 15:47:39 +01:00
Armin Novak
7ed99623df Fixed channel connected status. 2017-01-23 14:18:19 +01:00
Bernhard Miklautz
85da68c334 Merge pull request #3703 from akallabeth/prim_optimize
[PERFORMANCE] Inlined heavily used functions
2017-01-23 10:39:02 +01:00
David Fort
f68888a978 Add a callback that allows to adjust monitors layout
This callback is useful in server mode when you want to adjust the monitor
layout just before the server monitor layout PDU is built and sent.
2017-01-19 18:05:44 +01:00
David Fort
e775a2a46f Treat the result of the Capabilities callback
The result was ignored. Plus return the correct value in case of licence error (-1
instead of FALSE).
2017-01-19 17:57:44 +01:00
Armin Novak
4d40b3c58e Inlined heavy used functions. 2017-01-18 15:28:53 +01:00
Armin Novak
69dde84c72 Fixed broken variable declaration. 2017-01-18 14:30:06 +01:00
Armin Novak
ea45c148c0 Return OK in case of channel not connected. 2017-01-17 16:27:56 +01:00
Armin Novak
56a1425bca Do not terminate channel disconnect if one fails. 2017-01-17 16:06:12 +01:00
Norbert Federa
1046c95751 Merge pull request #3669 from xhaakon/master
Limit MultifragMaxRequestSize in server mode
2017-01-16 18:18:43 +01:00
Norbert Federa
71ce3378da Merge pull request #3665 from realjiangms/fix_ssl_add_all_digests
Winpr/openssl: Fix digests initialization in multi-thread
2017-01-13 09:46:14 +01:00
Jakub Adam
463cb41596 Allow custom MultifragMaxRequestSize in server mode
FreeRDP calculates default request size in server mode based upon
the desktop resolution. In practice, however, I've found clients (namely
MS Lync 2013) which would show only a black screen when the value is
greater than 0x3EFFFF.

This change allows to override the default in such special cases by
assigning a different value to server->settings->MultifragMaxRequestSize
after the shadow server structure is initialized in shadow_server_new().
2017-01-11 16:36:05 +01:00
akallabeth
3762401d43 Merge pull request #1750 from ccpp/master
Support for HTTP-Proxy
2017-01-11 11:02:00 +01:00
Martin Fleisz
72bcc7367e Merge pull request #3661 from akallabeth/error_status
Error status for DNS errors
2017-01-11 11:01:48 +01:00
akallabeth
1c39601740 Merge pull request #3684 from akallabeth/channel_attach_warn_fix
Fixed function argument types. #3683
2017-01-11 10:15:09 +01:00
Armin Novak
dd52f039f0 Fixed function argument types. #3683 2017-01-10 09:17:14 +01:00
akallabeth
8fd926f085 Merge pull request #3681 from mfleisz/openssl110_include_fix
Fix compilation with OpenSSL 1.1.0 using MSVC
2017-01-09 17:07:08 +01:00
Martin Fleisz
4f5aa69efc Merge pull request #3662 from akallabeth/session_detach_support
Session detach support
2017-01-09 16:58:57 +01:00
Martin Fleisz
ac090520c3 Fix compilation with OpenSSL 1.1.0 using MSVC 2017-01-09 16:43:28 +01:00
Bernhard Miklautz
6be43d43c2 Use common handle ids for all channels
Channels with regular and extended interface need to live in the same
handle name space otherwise they can't be uniquely identified in the
global channel manager.
2016-12-28 12:05:01 +01:00
zihao.jiang
a505a6cd27 Winpr/openssl: Fix digests initialization in multi-thread
SSL functions like OpenSSL_add_all_digests should be invoked at very beginning as they are not MT safe.
If not we might meet double free exception as following:

 #0  0x00007f23ddd71c37 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007f23ddd75028 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x00007f23dddae2a4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #3  0x00007f23dddba55e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #4  0x00007f23dc6ecfcd in CRYPTO_free () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #5  0x00007f23dc6ef8d1 in OBJ_NAME_add () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #6  0x00007f23dc77dcd8 in EVP_add_digest () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #7  0x00007f23dc782321 in OpenSSL_add_all_digests () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
 #8  0x00007f23c781da28 in winpr_openssl_get_evp_md (md=4) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:52
 #9  0x00007f23c781dccb in winpr_Digest_Init (ctx=0x7f22d064d470, md=<optimized out>) at /home/zihao/workspace/zihao_FreeRDP/winpr/libwinpr/crypto/hash.c:344
 #10 0x00007f23d486139b in security_salted_mac_signature (rdp=0x7f23859f5a20, data=0x7f238542d4fb "\004\204\022\004", length=4743, encryption=<optimized out>, output=0x7
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/security.c:378
 #11 0x00007f23d488d73f in fastpath_send_update_pdu (fastpath=<optimized out>, updateCode=4 '\004', s=0x7f23859f5f40, skipCompression=true)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/fastpath.c:1076
 #12 0x00007f23d4891c4f in update_send_surface_frame_bits (context=0x7f23859f5540, cmd=0x7f22b2ffcc80, first=true, last=true, frameId=6)
     at /home/zihao/workspace/zihao_FreeRDP/libfreerdp/core/update.c:1041

Related reports: https://rt.openssl.org/Ticket/Display.html?id=2216&user=guest&pass=guest
2016-12-28 03:48:40 +08:00
Armin Novak
9f19da798c Added attach/detach support for channels. 2016-12-19 17:07:01 +01:00
Armin Novak
ece9491932 Printing a warning if a error is overwritten. 2016-12-19 14:13:36 +01:00
Armin Novak
8250bbd6c8 Setting DNS error if lookup fails. 2016-12-19 13:49:40 +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
Christian Plattner
8658f04f42 Code reformatting of proxy.c, proxy.h 2016-12-13 12:12:04 +01:00
Christian Plattner
3cc39b2dcd Dynamic environment variable length of $https_proxy 2016-12-12 17:16:12 +01:00
Christian Plattner
50a3f55063 Bug: strndup not supported in windows 2016-12-12 16:56:52 +01:00
Christian Plattner
58ef7cc42d More abstracted proxy handling 2016-12-10 23:13:35 +01:00
Christian Plattner
d9e28c24ad Use logging API for HTTP proxy 2016-12-10 18:59:58 +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
Christian Plattner
49a6273c91 Revert "HTTP Proxy: Simplify using buffered BIO and trio_asprintf"
This reverts commit 91eddce7fb.

Conflicts:
	libfreerdp/core/proxy.c
	libfreerdp/core/tcp.c
2016-12-09 19:18:42 +01:00
Armin Novak
a1b2325c1d Ensure securityFlags are always initialized. 2016-12-02 12:04:53 +01:00
Armin Novak
c33754ae1d Fixed unused and uninitialized warnings. 2016-12-01 15:36:49 +01:00
Bernhard Miklautz
00dae7c5ef Fix some spelling errors
Fixes #3633
2016-12-01 15:36:49 +01:00
Norbert Federa
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Martin Fleisz
9e474b43d1 Merge pull request #3623 from akallabeth/mouse_wheel_event_check
Check hwheel capability before sending mouse event.
2016-11-25 13:41:07 +01:00
Norbert Federa
53bd98883e winpr/crypt api changes and memory leak fixes
- winpr_HMAC_New() now just returnes the opaque WINPR_HMAC_CTX* pointer
  which has to be passed to winpr_HMAC_Init() for (re)initialization
  and since winpr_HMAC_Final() no more frees the context you always have to
  use the new function winpr_HMAC_Free() once winpr_HMAC_New() has succeded

- winpr_Digest_New() now just returns the opaque WINPR_DIGEST_CTX* pointer
  which has to be passed to winpr_Digest_Init() for (re)initialization
  and since winpr_Digest_Final() no more frees the context you always have to
  use the new function winpr_Digest_Free() once winpr_Digest_New() has succeded
2016-11-24 18:27:29 +01:00
Norbert Federa
7befab856c Support for OpenSSL 1.1.0 2016-11-24 17:50:09 +01:00
Armin Novak
a0fed88574 Check hwheel capability before sending mouse event. 2016-11-24 13:19:46 +01:00
Martin Haimberger
7fe28a8a78 virtualChannel: removed static variable usage from
VirtualChannelApi
2016-11-23 04:17:56 -08:00
akallabeth
15716695fa Merge pull request #3593 from ccpp/gateway-http-bugfix
Bugfix in RDP Gateway HTTP: read/skip full HTTP body
2016-11-16 19:27:55 +01:00
Marc-André Moreau
128ce8a5a4 Merge pull request #3597 from awakecoding/tls_channel_fix
Virtual Channel Mapping Fix
2016-11-16 11:37:14 -05:00
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -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
Marc-André Moreau
23eae318c5 channels: start working on extended virtual channel API 2016-11-14 16:44:45 -05:00
Marc-André Moreau
70c4646722 channels: restore global tables for initHandle, openHandle mappings instead of thread local storage 2016-11-14 15:23:05 -05:00
Christian Plattner
b6e97cbad4 Bugfix in RDP Gateway HTTP: read/skip full HTTP body for non-RPC responses
This fixes issues #3300 and #3479, but it reveals that there might be a timeout issue with /gt:http and /gt:auto
2016-11-13 03:26:01 +01:00
David Fort
ea24c1f8e1 Merge pull request #3578 from realjiangms/fix_server_for_limit_frames
Fix server side code to be aware of rereadEvent
2016-11-03 22:50:08 +01:00
zihao.jiang
7676b29176 cleanup unnecessary code per comments 2016-10-29 13:18:17 +08:00
zihao.jiang
b58ee586e7 keeping the old callback and adding the new one at the end of the struct, so that it can be potentially binary compatible. 2016-10-29 00:28:10 +08:00
zihao.jiang
ddc326d6d3 Fix server side code to be aware of rereadEvent 2016-10-27 23:43:09 +08:00
Armin Novak
6276f3d39a Added log messages for invalid function call. 2016-10-27 14:36:48 +02:00
David Fort
f92860de87 Applied astyle formatting 2016-10-14 15:12:48 +02:00
David Fort
60cffef8d1 Release the reread event on transport_free 2016-10-14 15:12:48 +02:00
David Fort
fd7ebdc6a5 Took in account comment remarks 2016-10-14 15:12:48 +02:00
David Fort
03abf197ca test-connect: use a random port instead of always 3389
Doing so we have less chances to have a failure when we run 2 tests in parallel
on the same host (as sfrerdp-server listen on a socket).
2016-10-14 15:12:48 +02:00
David Fort
71fd5cc148 Limit the time passed in transport check loop
This patch make it possible to limit the time that is passed when we call
XXX_check_fds functions. This should smooth the treatment between handling inputs
and handling incoming bitmap updates.
The default maximum time is set to 100 ms.
2016-10-14 15:12:48 +02:00
Armin Novak
8fbc885f19 Removed unused variable. 2016-10-13 16:57:51 +02:00
Armin Novak
d1a28c59f7 Fixed uninitialized variable. 2016-10-13 16:57:51 +02:00
Martin Fleisz
9afc0cca26 Merge pull request #3536 from akallabeth/memory_leak_fixes
Memory leak fixes
2016-10-11 09:29:49 +02:00
Bernhard Miklautz
aa673986e8 Merge pull request #3533 from akallabeth/glyph_cache_disable
Glyph cache disable
2016-10-10 16:04:09 +02:00
Armin Novak
eecc4b189f Fixed leak in bitmap handling. 2016-10-10 10:42:14 +02:00
Armin Novak
bc69730863 Fixed memory leak in pointer free. 2016-10-10 10:42:14 +02:00
Armin Novak
8f75516650 Deactivated glyph cache. 2016-10-10 09:07:28 +02:00
Armin Novak
afc4408a6c Reformatted file. 2016-10-10 09:06:05 +02:00
Armin Novak
7709542d05 Using C99 compatible variadic macros. 2016-10-07 14:14:56 +02:00
Armin Novak
14fcfbbf31 Addin loader using proper function pointer defines. 2016-10-07 14:06:46 +02:00
Armin Novak
943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Bernhard Miklautz
ddced3f3ca Fix compiler warnings
clang version 3.9.1-svn281634-1~exp1 (branches/release_39)

freerdp-firerds/libfreerdp/core/channels.c:270:9: warning: returning
      'const WtsApiFunctionTable *' (aka 'const struct _WtsApiFunctionTable *') from a function with
      result type 'PWtsApiFunctionTable' (aka 'struct _WtsApiFunctionTable *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
        return &FreeRDP_WtsApiFunctionTable;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

uwac/libuwac/uwac-display.c:502:12: warning: comparison of
      unsigned enum expression < 0 is always false [-Wtautological-compare]
        if (error < 0 || error >= UWAC_ERROR_LAST)
            ~~~~~ ^ ~
2016-10-06 13:43:15 +02:00
Armin Novak
f5fff7658a Made some functions static. 2016-10-06 13:43:12 +02:00
Armin Novak
3220b15730 Added missing event handle. 2016-10-06 13:43:12 +02:00
Armin Novak
f2d7766db6 Moved common async input handling to core library. 2016-10-06 13:43:12 +02:00
Armin Novak
b8b84473a3 Fixed post disconnect hook. 2016-10-06 13:43:12 +02:00
Armin Novak
22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak
9c64e77a84 Disabled thread local storage on iOS.
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
Armin Novak
c7448c03fb Added FREERDP_LOCAL
CMake 2.8 does not support default visibility on windows.
To allow building tests add the FREERDP_LOCAL define for each
function that is internal to FreeRDP.
When build with testing these functions are exported and available
for use by tests.
2016-10-06 13:43:09 +02:00
Armin Novak
122f25eb60 Fixed channel cleanup. 2016-10-06 13:43:09 +02:00
Armin Novak
d35823cf69 Moved channel init code to core library. 2016-10-06 13:43:09 +02:00
Armin Novak
dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Armin Novak
a76b0df598 Fixed reading of colors from order. 2016-10-06 13:43:06 +02:00
Armin Novak
a372009fc4 Internal functions static. 2016-10-06 13:43:04 +02:00
Armin Novak
0e1b385b5f Internal functions static. 2016-10-06 13:43:03 +02:00
Armin Novak
867528015a Simplified bitmap drawing. 2016-10-06 13:43:03 +02:00
Armin Novak
032bdef955 Unified bitmap drawing. 2016-10-06 13:43:03 +02:00
Armin Novak
bb82d48506 Fixed part of font cache issue. 2016-10-06 13:43:03 +02:00
Armin Novak
3f90966da6 Bug fixes. 2016-10-06 13:43:03 +02:00
Armin Novak
85bbe2a908 API refactoring. 2016-10-06 13:43:03 +02:00
Armin Novak
e650fdb2b6 Bugfixes. 2016-10-06 13:43:02 +02:00
Armin Novak
17fd5526ac Cleanups. 2016-10-06 13:43:02 +02:00
Armin Novak
7a20ff5c30 Refactored bitmap API. 2016-10-06 13:43:02 +02:00
Armin Novak
8b69b16cbb Refactored Glyph API. 2016-10-06 13:43:02 +02:00
Armin Novak
9d5ca34d0d Fixed pointer initialisation for X11. 2016-10-06 13:43:02 +02:00
Armin Novak
c229a1939d Updated codec API, unified drawing order color decoding. 2016-10-06 13:43:02 +02:00
Armin Novak
f9a89ae6b4 Bug fixes, refactoring. 2016-10-06 13:43:01 +02:00
Armin Novak
8fffda5740 Fixed clearcodec and codecs reset. 2016-10-06 13:43:01 +02:00
Armin Novak
d98677094e Fixed warnings. 2016-10-06 13:43:00 +02:00
Armin Novak
48d1b4ee13 Fixed color ordering for GDI. 2016-10-06 13:42:59 +02:00
Armin Novak
b668b0d75e Api update. 2016-10-06 13:42:59 +02:00
Armin Novak
5633f5242a Fixed crashes. 2016-10-06 13:42:59 +02:00
Armin Novak
da956e0388 ... 2016-10-06 13:42:59 +02:00
Armin Novak
df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
zihao.jiang
2c00240a17 server/shadow: Fix regression with rdp8.0
Shadow server crash with rdp8.0 with gfx enabled.
Root Cause: rdp8.0 is not support in shadow gfx and rdpgfx_caps_advertise returns an error. However setChannelError crashs because context->errorDescription is NULL
1. Fix shadow gfx to handle rdp8.0
2. Initialize context->errorDescription for server side new-context
2016-08-29 02:50:09 +08:00
David Fort
5394a0425f Merge pull request #3316 from realjiangms/server_gfx
rdpgfx: Implementation for server side channel
2016-08-24 11:08:00 +02:00
Martin Haimberger
e9e0764ace libfreerdp/core: transport_write unchecked parameters
transport_write did not check if transport or bio are
set. The transport read checks it. In using fastpath
and for example a mouse input is sent, the transport
is never checked and can cause a segfault.
2016-08-22 02:17:11 -07:00
zihao.jiang
2b6bd2626d rdpgfx: various fixes according to comments
1. Fix stream leak in rdpgfx
2. Make src data const in zgfx. Harden zgfx to be independent to byte order
3. Fix written bytes return value in channel write
4. Add check for return value in shadow_client.c
5. Add gfx callback to send surface command with frame marker pdu.
6. Check remain length for recv subroutine
7. Fix compile errors
2016-08-07 20:15:39 +08:00
Marc-André Moreau
14cb6d33c6 freerdp: make modifications to NLA server-side fixes according to PR comments 2016-07-22 09:06:07 -04:00
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