Armin Novak [Wed, 17 Jan 2018 14:26:33 +0000 (15:26 +0100)]
Updated OpenSSL version for android.
Armin Novak [Wed, 17 Jan 2018 14:23:19 +0000 (15:23 +0100)]
Updated to OpenH264 1.7 and relocatable binaries.
David Fort [Wed, 17 Jan 2018 10:05:04 +0000 (11:05 +0100)]
Merge pull request #4365 from akallabeth/negociate_context_reset_fix
Negociate context reset fix
Armin Novak [Wed, 17 Jan 2018 08:09:58 +0000 (09:09 +0100)]
Fixed missing packageName setup in server NLA
Armin Novak [Wed, 17 Jan 2018 07:17:33 +0000 (08:17 +0100)]
Simplified package name comparisons.
Armin Novak [Wed, 17 Jan 2018 07:12:54 +0000 (08:12 +0100)]
Changed length arguments and return to size_t
Armin Novak [Tue, 16 Jan 2018 10:34:07 +0000 (11:34 +0100)]
Refactored NTLM, functions static where approprate
Armin Novak [Tue, 16 Jan 2018 09:58:30 +0000 (10:58 +0100)]
Refactored kerberos SSPI
* Functions static where approrpriate
* Variables static const where appropriate
Armin Novak [Tue, 16 Jan 2018 09:37:19 +0000 (10:37 +0100)]
Fixed ICU support for CP_ACP
Armin Novak [Tue, 16 Jan 2018 09:31:08 +0000 (10:31 +0100)]
Fix #4306:
* Do not reset context when changing package.
* All functions not exported static.
Martin Fleisz [Mon, 15 Jan 2018 10:18:59 +0000 (11:18 +0100)]
Merge pull request #4362 from akallabeth/ifdef_fix
Fixed broken #ifdef
Armin Novak [Mon, 15 Jan 2018 09:18:03 +0000 (10:18 +0100)]
Fixed broken #ifdef
akallabeth [Mon, 15 Jan 2018 09:13:26 +0000 (10:13 +0100)]
Merge pull request #4359 from MartinHaimberger/yuvfix
YUV conversation: fixed luma frame creation
David Fort [Mon, 15 Jan 2018 08:57:23 +0000 (09:57 +0100)]
Merge pull request #4358 from akallabeth/ntlm_debug_fix
Fixed #4357: NTLM debug message.
Armin Novak [Fri, 12 Jan 2018 08:00:59 +0000 (09:00 +0100)]
Fixed bitmap capability debug.
Armin Novak [Fri, 12 Jan 2018 07:57:20 +0000 (08:57 +0100)]
Fixed #4357: NTLM debug message.
Martin Haimberger [Fri, 12 Jan 2018 08:08:56 +0000 (00:08 -0800)]
YUV conversation: fixed luma frame creation
in the conversation function general_RGBToAVC444YUVv2_ANY
akallabeth [Thu, 11 Jan 2018 16:46:12 +0000 (17:46 +0100)]
Merge pull request #4355 from jukeks/topic/smartcard_status_cbAtrLen
Fix smartcard login by ignoring Status_Call.cbAtrLen as is required by [MS-RDPESC]
Jukka-Pekka Virtanen [Thu, 11 Jan 2018 14:19:02 +0000 (16:19 +0200)]
[MS-RDPESC] 2.2.2.18 Status_Call.cbAtrLen: Unused. MUST be ignored upon receipt.
The [MS-RDPESC] clearly states in section 2.2.2.18 that Status_Call's
cbAtrLen must not be used when generating Status_Return response. This
is also how FreeRDP 1.1 behaves.
MartinHaimberger [Wed, 10 Jan 2018 14:33:13 +0000 (15:33 +0100)]
Merge pull request #4349 from akallabeth/primitives_update
Added new and optimized YUV primitives.
Armin Novak [Wed, 10 Jan 2018 08:16:59 +0000 (09:16 +0100)]
Added new and optimized YUV primitives.
* RGBToAVC444YUVv2: Split a RGB frame in luma and/or chroma v2 YUV420 frames
* RGBX specific versions of RGBToAVC444YUV and RGBToYUV420_8u_P3AC4R
David Fort [Wed, 10 Jan 2018 08:57:54 +0000 (09:57 +0100)]
Merge pull request #4339 from akallabeth/gdi_sw_crash_fix
Fixed #4336: Initialize rectangle.
Armin Novak [Mon, 8 Jan 2018 12:03:06 +0000 (13:03 +0100)]
Reduced log priority in gdi_CRgnToRect
David Fort [Mon, 8 Jan 2018 10:16:21 +0000 (11:16 +0100)]
Merge pull request #4323 from akallabeth/scanbuild_fixes
Scanbuild and other warnings fixed
akallabeth [Mon, 8 Jan 2018 09:01:50 +0000 (10:01 +0100)]
Merge pull request #4338 from 2asoft/2asoft/fix-html-clipboard
Ensure HTML Format clipboard synthesizer always converts number strings as if they are in base 10
David Fort [Mon, 8 Jan 2018 08:29:25 +0000 (09:29 +0100)]
Merge pull request #4333 from akallabeth/drive_param_check_fix
Fixed drive redirection argument check
akallabeth [Mon, 8 Jan 2018 08:21:53 +0000 (09:21 +0100)]
Merge pull request #4334 from h3xx/fix-ffmpeg-support
Fix building against current ffmpeg
akallabeth [Mon, 8 Jan 2018 08:20:56 +0000 (09:20 +0100)]
Merge pull request #4332 from hardening/xrandr_and_fixes
Xrandr and fixes
Armin Novak [Mon, 8 Jan 2018 07:57:45 +0000 (08:57 +0100)]
Fixed #4336: Initialize rectangle.
Anton Afanasyev [Sun, 7 Jan 2018 02:45:22 +0000 (18:45 -0800)]
StartHTML and EndHTML values can be left-padded with 0 characters. strtol and friends treat this as base-8 if base is specified as 0.
Because these values are always sent in base-10, fix is to always use base-10
Mike Gilbert [Thu, 4 Jan 2018 21:56:47 +0000 (16:56 -0500)]
Merge pull request #4335 from floppym/ssse3
Rework SSE2/SSE3/SSSE3 build code
Mike Gilbert [Fri, 29 Dec 2017 19:00:24 +0000 (14:00 -0500)]
codec/nsc_sse2: add runtime CPU feature check
Mike Gilbert [Fri, 29 Dec 2017 18:44:33 +0000 (13:44 -0500)]
cmake: do not add -msse2/-msse3 globally
Mike Gilbert [Sun, 24 Dec 2017 21:58:07 +0000 (16:58 -0500)]
cmake: rework logic to apply -msse2, -msse3, -mssse3 to specific files
If we apply -mssse3 to files that don't need it, gcc may automagically
generate instructions that will not run on certain CPUs. This breaks the
runtime feature detection code (IsProcessorFeaturePresent).
Fixes: https://github.com/FreeRDP/FreeRDP/issues/4308
Dan Church [Fri, 29 Dec 2017 16:59:45 +0000 (10:59 -0600)]
Provide support for older versions of libavcodec
My method was to find the LIBAVUTIL_VERSION_* at the commit where the
updated AV_ prefixed constants became available, add one "micro" version
to it, then if it's not at least that version, provide the unprefixed
constant. It just so happens that the same commit introduced all
the AV_* constants.
David Fort [Fri, 29 Dec 2017 09:29:02 +0000 (10:29 +0100)]
Merge pull request #4327 from akallabeth/disconnect_fix
Exit client thread if freerdp_connect fails
David Fort [Thu, 28 Dec 2017 18:53:15 +0000 (19:53 +0100)]
Merge pull request #4329 from akallabeth/sw_gdi_fix
Sw gdi fix drawing problems
Dan Church [Thu, 28 Dec 2017 15:41:45 +0000 (09:41 -0600)]
Fix future ffmpeg support
The AV_ prefixed constants have been available since
ffmpeg@
def97856de6021965db86c25a732d78689bd6bb0 (2015-07-07), or version
2.8.
The non-prefixed constants are set to be removed in the next ffmpeg
release, and were removed in
ffmpeg@
302554835e39b79b977ed60c9afe81b44590dfef (2016-12-05).
akallabeth [Thu, 28 Dec 2017 13:05:11 +0000 (14:05 +0100)]
Fixed drive redirection argument check
Allow special cases '*' and '%' to pass parameter checks.
David Fort [Sat, 23 Dec 2017 12:50:54 +0000 (13:50 +0100)]
Fix for #4330
Since ec027bf dynamic resolution is broken when used with egfx. Before that commit
we were tracking a server sent resize by setting a DesktopResize callback. This callback
is called when the desktop is resized by the server. Anyway the problem was that when this
callback is called, the activation sequence is not always completed, which were leading to
some freeze with 2012r2 servers (sending packets before the sequence is finished).
So with the faulty commit, we are tracking server resizes by subscribing to the Actived
event, that is called at the end of a reactivation sequence, so we're sure to not send packets
when not fully activated.
Anyway the issue that shows on (#4330) is that when you use egfx, no reactivation sequence happens,
the server only sends a ResetGraphics message with the new size, and so we miss the resized event.
This fix introduces a new GraphicsReset event, makes the display channel subscribe to that event,
and react accordingly.
David Fort [Sat, 23 Dec 2017 09:27:38 +0000 (10:27 +0100)]
Use more xrandr attributes when available and preserve [desktop|device]ScaleFactor
Fix a too restrictive detection of XRandr support.
Set more monitor's attributes like physical size and orientation when XRandr is
available.
Set [desktop|device]ScaleFactor when it has been given on the command line, this
should fix #4324.
David Fort [Sat, 23 Dec 2017 09:26:25 +0000 (10:26 +0100)]
micro code style changes
David Fort [Fri, 22 Dec 2017 16:55:48 +0000 (17:55 +0100)]
zgfx: add a check
Armin Novak [Fri, 22 Dec 2017 12:43:37 +0000 (13:43 +0100)]
Fix #4299: gdi_CRgnToRect
The coordinates from RDP ROP commands do not (always) have
0,0 as the origin of the drawing operation.
Adjust the coordinates to our local coordinate system.
Armin Novak [Fri, 22 Dec 2017 10:09:23 +0000 (11:09 +0100)]
Exit client thread if freerdp_connect fails
freerdp_disconnect must only be called, if the connection
was established. Otherwise all resources are cleaned up twice
leading to double free and other issues.
Armin Novak [Fri, 22 Dec 2017 09:37:04 +0000 (10:37 +0100)]
Added ROP to primary order debug message.
Armin Novak [Fri, 22 Dec 2017 09:25:05 +0000 (10:25 +0100)]
Added ROP to string functions for log messages.
Armin Novak [Thu, 21 Dec 2017 10:34:44 +0000 (11:34 +0100)]
Fixed dead store warnings.
Armin Novak [Thu, 21 Dec 2017 10:30:21 +0000 (11:30 +0100)]
Removed unused functions, fixed feature define guards
Armin Novak [Thu, 21 Dec 2017 10:27:08 +0000 (11:27 +0100)]
Removed unused variables.
David Fort [Thu, 21 Dec 2017 10:25:39 +0000 (11:25 +0100)]
Merge pull request #4319 from akallabeth/fullscreen_legacy_fix
Fullscreen without _NET_WM_FULLSCREEN_MONITORS
Armin Novak [Thu, 21 Dec 2017 10:04:50 +0000 (11:04 +0100)]
Fixed unused variable warnings.
Armin Novak [Thu, 21 Dec 2017 10:04:32 +0000 (11:04 +0100)]
Fixed missing initialization warnings.
Armin Novak [Thu, 21 Dec 2017 09:45:55 +0000 (10:45 +0100)]
Fixed smartcard related scanbuild warnings.
Martin Fleisz [Thu, 21 Dec 2017 08:51:33 +0000 (09:51 +0100)]
Merge pull request #4321 from akallabeth/rdp_parser_fix
Fixed RDP file parser for unicode.
Armin Novak [Thu, 21 Dec 2017 08:34:35 +0000 (09:34 +0100)]
Fixed various scanbuild warnings.
akallabeth [Wed, 20 Dec 2017 16:01:58 +0000 (17:01 +0100)]
Merge pull request #4303 from krisztian-kovacs-balabit/use-redirection-password
Use redirection password
Armin Novak [Wed, 20 Dec 2017 11:02:23 +0000 (12:02 +0100)]
Fullscreen without _NET_WM_FULLSCREEN_MONITORS
Some window managers do not support _NET_WM_FULLSCREEN_MONITORS.
In that case multimonitor fullscreen does not properly work, so
add a path resizing the window over all screens instead.
Based on @erbth pull request, adding proper X11 atom checks.
Martin Fleisz [Wed, 20 Dec 2017 13:17:20 +0000 (14:17 +0100)]
Merge pull request #4320 from ondrejholy/coverity-fixes
Coverity Scan fixes
Armin Novak [Wed, 20 Dec 2017 12:43:14 +0000 (13:43 +0100)]
Fixed RDP file parser for unicode.
There was a memory corruption hidden due to ignoring the
buffer size argument.
Martin Fleisz [Wed, 20 Dec 2017 12:43:22 +0000 (13:43 +0100)]
Merge pull request #4318 from hardening/display_improvement
Dynamic resolution improvements
Martin Fleisz [Wed, 20 Dec 2017 11:38:38 +0000 (12:38 +0100)]
Merge pull request #4239 from akallabeth/test_memleak_fixes
Test memleak fixes
David Fort [Tue, 19 Dec 2017 14:16:14 +0000 (15:16 +0100)]
disp: improve window resizing
To workaround a bug with 2012r2 servers, don't send any resize during renegociation
and don't resize at a too high rate (every 200ms is good enough).
David Fort [Tue, 19 Dec 2017 08:38:24 +0000 (09:38 +0100)]
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.
Ondrej Holy [Tue, 19 Dec 2017 13:42:06 +0000 (14:42 +0100)]
crypto: Improve PER OID calculations
"(oid[0] << 4) & (oid[1] & 0x0F)" statement is always 0. It is not
problem currently because the only OID which is written by this
function should have 0 there. The function to read/write are pretty
limited anyway and can't work properly with all kind of OIDs. Maybe
it would be better to hardcode the OID there without decoding
and encoding. But those functions are already there so let's improve
them a bit according the spec and warn about limited set of
supported OIDs.
See:
https://msdn.microsoft.com/en-us/library/windows/desktop/
bb540809
akallabeth [Tue, 19 Dec 2017 12:49:02 +0000 (13:49 +0100)]
Merge pull request #4313 from hardening/dyn_res_update
disp: implement dynamic resolution for X11
Ondrej Holy [Tue, 19 Dec 2017 12:02:55 +0000 (13:02 +0100)]
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.
Ondrej Holy [Tue, 19 Dec 2017 11:21:34 +0000 (12:21 +0100)]
tsmf: Prevent string overflow and unterminated strings
Device variable can overflow, or be unterminated. Replace strcpy
by strncpy and be sure that the string is terminated (sizeof() - 1).
Ondrej Holy [Tue, 19 Dec 2017 09:21:03 +0000 (10:21 +0100)]
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.
akallabeth [Mon, 18 Dec 2017 08:42:28 +0000 (09:42 +0100)]
Merge pull request #4315 from MrCsabaToth/patch-1
Docu copy-paste error fix when referring to the Android 64 bit config
Csaba Toth [Sat, 16 Dec 2017 19:37:32 +0000 (11:37 -0800)]
Documentation copy-paste error fix when referring to the Android 64 bit config
akallabeth [Thu, 14 Dec 2017 15:56:29 +0000 (16:56 +0100)]
Merge pull request #4312 from bmiklautz/smartcard-cleanup
Smartcard fixes and cleanup
Bernhard Miklautz [Thu, 14 Dec 2017 15:21:19 +0000 (16:21 +0100)]
fix client/smartcard: indentation and return value
Integrate feedback from pull request review.
Bernhard Miklautz [Thu, 14 Dec 2017 14:46:14 +0000 (15:46 +0100)]
fix smartcard: SCardStatus unicode handling
* fix StatusW_Call to rely and use SCardStatusW
* fix trace call in StatusW_Call - needs to be called after the sizes
are set
* unify SCardStatus functions for pcsc - let the internal function handle unicode directly
This fixes an issue with size calculations of SCardStatusW.
David Fort [Wed, 29 Nov 2017 09:26:04 +0000 (10:26 +0100)]
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.
Martin Fleisz [Wed, 13 Dec 2017 16:24:41 +0000 (17:24 +0100)]
Merge pull request #4305 from hardening/xrandr_fix
Fix XRandr for old systems and MacOSX
Bernhard Miklautz [Wed, 13 Dec 2017 15:57:53 +0000 (16:57 +0100)]
fix channel/smartcard: leak in Connect[AW]
smartcard_Connect[AW] leaked the reader buffer in error case.
Bernhard Miklautz [Wed, 13 Dec 2017 14:50:33 +0000 (15:50 +0100)]
feat winpr/smartcard: add test for SCardStatus
Add an extensive test for SCardStatus. It's not enabled per default
as it requires a reader with card to be present.
Bernhard Miklautz [Wed, 13 Dec 2017 14:46:50 +0000 (15:46 +0100)]
fix channel/smartcard: SCardStatus
Add support for fmszReaderNamesIsNULL. Formating of the touched files
was also updated.
Bernhard Miklautz [Mon, 11 Dec 2017 15:25:46 +0000 (16:25 +0100)]
fix channel/smartcard: compiler warnings
* remove unused variables
* remove unused jump label
Bernhard Miklautz [Mon, 11 Dec 2017 14:49:03 +0000 (15:49 +0100)]
refactor winpr/smartcard/pcsc: reader/group naming
The PCSC SCard implementation in winpr tried to rename reader and group
names received from PCSC to something similar to what the windows smart
card service would return.
Because of the following reasons this mapping was removed:
* reader names are not standardized
* no mapping of reader name should be required at all
* the mapping added extra complexity
* the mapping didn't produce the same names as if the reader was
directly connected on windows (or redirected from a windows host)
In case there are situations where this is nevertheless required this
feature can simple be (re-)implemented a part of the smart card channel.
Also the formatting was fixed.
Bernhard Miklautz [Mon, 11 Dec 2017 14:15:02 +0000 (15:15 +0100)]
feat winpr: add WINPR_UNUSED macro
WINPR_UNUSED can be used to mark intentionally unused function parameters.
Bernhard Miklautz [Mon, 11 Dec 2017 13:31:19 +0000 (14:31 +0100)]
fix channel/smartcard: remove SCardAddReaderName
SCardAddReaderName isn't part of the SCard API.
Note: removing this also removes the possibility to redirect single
smartcard readers with /smartcard:READERNAME. However this features
wasn't implemented in a general way and will be re-added as part of
the smart card channel directly.
Bernhard Miklautz [Mon, 11 Dec 2017 13:00:09 +0000 (14:00 +0100)]
fix channel/smartcard: simplify channel variables
Path was not really used and name was duplicated. Use the device->Name
directly.
Bernhard Miklautz [Mon, 11 Dec 2017 09:33:28 +0000 (10:33 +0100)]
fix channel/smartcard: remove status mappings
The state tracking/modifications (presumably thought as optimization?!) in
PCSC_SCardGetStatusChange_Internal cause a lot of applications to behave
incorrectly and/or hang. Ideally no modifications of the states should
be necessary as PCSC implements the same API as passed over the channel.
Bernhard Miklautz [Mon, 4 Dec 2017 15:16:59 +0000 (16:16 +0100)]
fix channel/smartcard: GetStatusChange return code
In case SCardGetStatusChange returned an error the call didn't return
any data but STATUS_NO_MEMORY as the calloc failed. This caused problems
with multiple applications server side (hangs and incorrect behavior).
Now the case when no readers are returned is handed correctly and the
data is also filled and send if the call fails.
Bernhard Miklautz [Mon, 4 Dec 2017 14:22:07 +0000 (15:22 +0100)]
fix channel/smartcard: async request handling
The smart card channel tried to mimic mstsc's behavior on if an IRP was
processed synchronously or asynchronously. As the channel uses one thread per
context it could happen, especially with PCSC, that the main
channel thread was blocked waiting for an smart card operation to
complete. To prevent that behavior only call known safe functions in the
main thread (like CreateContext) and call the rest asynchronously.
For example the channel would block if a ListReaders is invoked on
the same context where a GetStatusChange (infinite timeout)
was already pending. Only when a status change happened the channel
would continue.
Note: Due to the one context per thread design it's important that
cancel isn't queued an alway run synchronously. Otherwise a specific
context might lock.
Bernhard Miklautz [Mon, 4 Dec 2017 11:31:10 +0000 (12:31 +0100)]
fix channel/smartcard: return value handling
Device control calls always returned SCARD_S_SUCCESS even if an error
occurred. This caused server side software (including the card manager)
to behave incorrectly.
Bernhard Miklautz [Mon, 4 Dec 2017 11:17:57 +0000 (12:17 +0100)]
fix channel/smartcard: error handling
According to MS-RDPESC the smart card channel must set the IoStatus to
an NTSTATUS in case a encoding or decoding error happens. The smart card
channel did this correctly but the output stream was modified
incorrectly causing the smart card remote manager to stop in error
cases.
Martin Fleisz [Wed, 13 Dec 2017 08:58:14 +0000 (09:58 +0100)]
Merge pull request #4276 from akallabeth/big_endian_more
Big endian fixes
Martin Fleisz [Wed, 13 Dec 2017 08:09:33 +0000 (09:09 +0100)]
Merge pull request #4301 from hardening/geometry
geometry: a skeleton for the MS-RDPEGT channel
Armin Novak [Tue, 12 Dec 2017 10:41:43 +0000 (11:41 +0100)]
Fixed remaining color renaming issues.
Armin Novak [Tue, 12 Dec 2017 09:47:17 +0000 (10:47 +0100)]
Cleanup and initialization checks.
Armin Novak [Wed, 15 Nov 2017 08:11:12 +0000 (09:11 +0100)]
Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
David Fort [Tue, 12 Dec 2017 09:40:14 +0000 (10:40 +0100)]
Merge pull request #4277 from akallabeth/mac_server
Mac fixes
Armin Novak [Tue, 12 Dec 2017 09:35:02 +0000 (10:35 +0100)]
Fixed uninitialized variable.
David Fort [Mon, 11 Dec 2017 09:25:21 +0000 (10:25 +0100)]
Fix users of Stream_GetPosition() that returns size_t
David Fort [Wed, 6 Dec 2017 12:51:45 +0000 (13:51 +0100)]
geometry: a skeleton for the MS-RDPEGT channel
The base for implementing the MS-RDPEGT client channel that allows to track window
geometry.
David Fort [Fri, 8 Dec 2017 09:45:50 +0000 (10:45 +0100)]
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.
KOVACS Krisztian [Wed, 6 Dec 2017 15:32:56 +0000 (16:32 +0100)]
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.