Commit Graph

333 Commits

Author SHA1 Message Date
Armin Novak
6339c43c80 Fixed sockfd/socketBio resource leak. 2018-10-25 13:41:47 +02:00
Armin Novak
42014e80d0 Fixed sockfd/socketBio resource leak. 2018-10-25 13:38:31 +02:00
Armin Novak
847ee233f4 Fixed resource leak in rpc_ntlm_http_request 2018-10-25 12:49:42 +02:00
akallabeth
d3c1db1746
Merge pull request #4947 from akallabeth/http_gw_fix
Fixed http gateway body length read.
2018-10-23 12:03:03 +02:00
Armin Novak
b9933e7af4 Read byte by byte, the alignment may otherwise be broken. 2018-10-19 12:52:14 +02:00
Armin Novak
5a747b118d Read http request in 4byte chunks until '\r\n\r\n' is found
Avoid reading too much data in a single call to BIO_read as some
implementations may return a lot more data than is part of the response.
2018-10-19 12:16:04 +02:00
Emmanuel Ledoux
33c7f6590a fixed partial reads 2018-10-19 11:56:56 +02:00
Armin Novak
d05684a50a Properly parse ContentType to find length. 2018-10-19 11:47:11 +02:00
Armin Novak
7e397d0f1c Fixed http gateway body length read. 2018-10-19 09:31:55 +02:00
akallabeth
6f14018a22
Merge pull request #4945 from mmattes/fix/transferEncoding
transferEncoding can be NULL, correct if happens in line 348
2018-10-18 15:37:24 +02:00
Norbert Federa
5ef243f91f
Merge pull request #4941 from nfedera/nf-remove-stale-valgrind-macro
gateway/rpc: remove stale valgrind macro
2018-10-18 14:08:23 +02:00
Markus Mattes
6d5b88cda6 transferEncoding can be NULL, verification happens in line 348 2018-10-18 13:59:49 +02:00
Norbert Federa
d201deede8 gateway/rpc: remove stale valgrind macro 2018-10-18 11:45:18 +02:00
Armin Novak
2e3832af94 Fixed TSG stream alignment (4 or 8) 2018-10-18 10:41:03 +02:00
Armin Novak
dc197d4dd1 Fixed tsg abort condition. 2018-10-18 10:15:51 +02:00
Armin Novak
88d310ff2c Fixed compiler warnings (casts, ...) 2018-10-18 09:09:30 +02:00
Armin Novak
f91590ecbf Fixed bugs detected during scanbuild run 2018-10-17 13:19:33 +02:00
Armin Novak
766a66a7c2 Fixed stream get position. 2018-10-09 14:24:58 +02:00
Armin Novak
166bdf018c Fixed return value of rpc_channel_tls_connect 2018-10-09 14:24:39 +02:00
Armin Novak
65bfb67f7c Fixed rpc_client_write_call resource cleanup. 2018-10-09 14:19:05 +02:00
Armin Novak
8c92f3436d Fixed argument name for ntlm_client_encrypt 2018-10-09 14:16:27 +02:00
Armin Novak
fc9ff6d2fc Made gateway NTLM self contained. 2018-09-28 12:29:29 +02:00
Armin Novak
99eb9f7ec9 Refactored and simplified RPC signature functions. 2018-09-28 12:08:27 +02:00
Armin Novak
9516c251c7 Made TSG struct opaque 2018-09-28 12:00:45 +02:00
Armin Novak
7ab1251a67 Refactored rpc_client and resolve gateway only once. 2018-09-27 16:42:27 +02:00
Armin Novak
f5f155b057 Refactored RpcClient functions 2018-09-27 16:26:46 +02:00
Armin Novak
8a677d6cf2 Refactored rdg channel structs. 2018-09-27 16:05:14 +02:00
Armin Novak
d748adbf14 Refactored gateway ncacn HTTP to be self contained. 2018-09-27 15:19:41 +02:00
Armin Novak
a5fdf9e006 Refactored gateway HTTP to be self contained. 2018-09-27 15:04:41 +02:00
Armin Novak
33be80cb41 Removed unused variables. 2018-08-24 13:40:36 +02:00
Ondrej Holy
83e966d9e2 core/gateway/rpc: Fix leak found by covscan
0 is valid return value from socket().

leaked_storage: Variable "auth_3_pdu" going out of scope leaks the storage it points to.
leaked_storage: Variable "response" going out of scope leaks the storage it points to.
leaked_handle: Handle variable "sockfd" going out of scope leaks the handle.
2018-08-22 14:34:02 +02:00
Ondrej Holy
6de583e137 core/gateway/rpc: Format code by astyle
Run ./scripts/format_code.sh before the following changes.
2018-08-22 14:34:02 +02:00
Ondrej Holy
409e192334 core/gateway/rdg: Fix leak found by covscan
leaked_storage: Variable "request" going out of scope leaks the storage it points to.
leaked_handle: Handle variable "sockfd" going out of scope leaks the handle.
leaked_handle: Handle variable "sockfd" going out of scope leaks the handle.
2018-08-22 14:34:02 +02:00
Armin Novak
ec0a0fef2a Added const to function buffer pointers 2018-08-01 12:56:18 +02:00
Pascal J. Bourguignon
15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
Armin Novak
d4c98e4e71 Fixed formatting. 2018-05-03 12:30:40 +02:00
Armin Novak
5765e9a422 Fixed #4476: broken casts/variable sizes for custom BIO calls. 2018-05-03 12:30:40 +02:00
Martin Fleisz
296b19e172
Merge pull request #4596 from p-pautov/rdg_ssl_fixes
RDG related fixes for better compatibility with mstsc
2018-05-03 10:23:12 +02:00
akallabeth
2215071b23
Merge pull request #4576 from ccpp/bugfix-rdg-poll
Fix polling in RDG
2018-05-02 17:59:10 +02:00
David Fort
0f968b782c proxy: cleanup SOCKS support and add user/password support 2018-05-02 10:51:16 +02:00
Pavel Pautov
a0019ec79c Fallback to RDG RPC transport only if server does not support RDG HTTP and
error out in other cases - invalid RDG SSL cert, bad credentials, PAA failue, etc.
2018-04-25 18:36:43 -07:00
Christian Plattner
4a19f49878 Fail on unimplemented BIO_ctrl for /gt:rpc 2018-04-24 20:45:52 +02:00
Christian Plattner
4739189cfc Implement BIO_ctrl more correctly for RDG
See #3602

This change is discussed in https://github.com/FreeRDP/FreeRDP/pull/4576#pullrequestreview-113381733
2018-04-24 16:47:33 +02:00
Christian Plattner
a15644365e Fix BIO_get_fd for RDG, again. 2018-04-18 21:50:47 +02:00
Christian Plattner
f9d036a874 Fix #3602 by implementing BIO_get_fd correctly for RDG 2018-04-18 10:47:06 +02:00
Pavel Pautov
c866923897 Avoid buffer to struct cast. 2018-04-16 19:06:16 -07:00
Pavel Pautov
8fc0ea7199 Send correct packet size in case of PAA. Some cleanup. 2018-04-16 19:06:16 -07:00
Pavel Pautov
bbee19ced2 Content-Length and Transfer-Encoding are mutually exclusive. 2018-04-16 19:06:16 -07:00
Pavel Pautov
ec42228b2a Consolidate IN/OUT data connections establishment into common function and clean up related code. 2018-04-16 19:06:16 -07:00
Pavel Pautov
00256bba1d Move NTLM auth related code into dedicated functions. 2018-04-16 19:06:16 -07:00