Commit Graph

1672 Commits

Author SHA1 Message Date
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
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