Commit Graph

60 Commits

Author SHA1 Message Date
matt335672 8b8cfbe119 Improve wrapping of openssl module 2022-01-28 12:23:40 +00:00
matt335672 c9afd804a4 Minor const and comment fixes 2021-07-27 13:36:34 +01:00
Alexandre Quesnel 2ab3b97ba0 Migrating logging to LOG() and LOG_DEVEL() in common/* 2021-03-14 23:33:31 +00:00
Alexandre Quesnel bb9d3079c0 Fixing formatting with astyle in common/* 2021-03-14 23:33:31 +00:00
matt335672 0a1a8f40e5 Moved a lot of string funcs to string_calls module 2020-12-22 11:57:24 +00:00
Matt Burt 1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
matt335672 da3114007c Address possible memory out-of-bounds accesses 2020-04-15 09:57:05 +01:00
Jay Sorg ee65ccb31d use address for tcp:// and tcp6:// and vsock:// 2019-07-01 17:56:50 -07:00
Jay Sorg 0bc7803eaa add TCP V4 and V6 only socket functions 2019-06-29 23:59:18 -07:00
Jay Sorg 0ed82f71e8 xrdp: check term event for more responsive shutdown 2019-04-01 23:14:09 -07:00
Ben Cohen 3b5b7a5935 UDS file deleted after first connection
If you run xrdp with a Unix Domain Socket (UDS) for the port specified in
/etc/xrdp/xrdp.ini then the first connection succeeds but subsequent
connections fail.  In fact the UDS is deleted from the filesystem as soon
as the first connection is established.

Test case:

1. Edit /etc/xrdp/xrdp.ini to set "port=/var/run/xrdp-local.socket".

2. Restart xrdp.

3. Run the following.  When rdesktop starts up and the logon dialog is
   displayed, press "Cancel".

   sudo socat TCP-LISTEN:12345 UNIX-CONNECT:/var/run/xrdp-local.socket &
   rdesktop localhost:12345

4. Run the following:

    sudo socat TCP-LISTEN:12346 UNIX-CONNECT:/var/run/xrdp-local.socket &
    rdesktop localhost:12346

Expected behaviour: rdesktop starts up and displays the logon dialog.
Observed behaviour: rdesktop exits with "ERROR: Connection closed" and
                    socat exits with "No such file or directory.

This is because in the child process after forking, xrdp_listen_fork()
calls trans_delete() which deletes the UDS.  Simply commenting out the
g_file_delete() and g_free() fixes this, but that isn't a proper solution
because trans_delete() is called from elsewhere where the UDS might no
longer be wanted.

Fix by adding a function trans_delete_from_child() that frees and clears
listen_filename before calling trans_delete(), and call the new function
from xrdp_listen_fork().

(Workaround: set "fork=false" in /etc/xrdp/xrdp.ini, because
trans_delete() is then not called.)
2018-03-27 09:22:49 +03:00
Jay Sorg c6c513b23c use g_memcpy, braces 2017-11-07 18:20:45 -08:00
Jay Sorg 26507644e3 vsock, move some defines 2017-11-07 18:20:45 -08:00
Justin Terry (VM) 50bd624cc4 Implements XRDP over vsock
1. Implements the ability to use AV_VSOCK for the transport rather than TCP.
2. Updates the ini file to be able to conditionally turn this feature on.
2017-11-07 18:20:45 -08:00
Pavel Roskin 6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Koichiro IWAO e94ab10e14 TLS: new method to specify SSL/TLS version
SSL/TLS protocols only listed in ssl_protocols should be used.
The name "ssl_protocols" comes from nginx.

Resolves #428.
2017-02-27 14:17:25 +09:00
Koichiro IWAO 40e8194122 TLS: log TLS version and cipher 2016-11-22 10:50:30 +09:00
Alex Illsley 47124df4ed new options for xrdp.ini disableSSlv3=yes and tls_ciphers=HIGH and code to implement 2016-08-25 11:20:47 -07:00
Pavel Roskin 0c72ee2371 Use char* for TLS send and receive
This is consistent with ssl_tls_read() and ssl_tls_write(). C++ warnings
are fixed without adding any casts.
2016-07-08 04:29:56 +00:00
Jay Sorg fac0907a3c trans: set non blocking socket after accept 2016-04-27 18:16:45 -07:00
Jay Sorg 0655272b9c common: call recv/send before can_recv/can_send 2016-04-06 16:37:34 -07:00
Jay Sorg 2893fefc91 common: check for term in force send and recv 2016-01-11 18:06:29 -08:00
Jay Sorg 4f128c530c no logic change, remove trailing space 2015-12-11 20:37:43 -08:00
Jay Sorg e1c7aa377f common: fix possible deadlock in trans 2015-11-02 17:57:11 -08:00
Jay Sorg fd793bd213 rename g_tcp_can_recv to g_sck_can_recv 2015-10-07 22:17:12 -07:00
Jay Sorg 6384bae1e7 common: changes to trans for timeout 2015-08-18 21:10:23 -07:00
Jay Sorg 6c23b85593 add timeout to trans_get_wait_objs_rw 2015-07-13 01:10:48 -07:00
Jay Sorg 136e072513 fix problem caused by b56aa98 for tls connections 2015-07-12 01:38:30 -07:00
Jay Sorg b56aa9832e work on main loop changes 2015-07-05 23:14:46 -07:00
Jay Sorg cc0406dddf common: move tls calls to ssl_calls 2014-11-25 18:55:37 -08:00
Jay Sorg 5a8bf87c7f common: tls, fix for pending reads 2014-11-21 20:49:01 -08:00
speidy 4015f526db work on tls mode 2014-08-22 09:13:33 +03:00
Laxmikant Rashinkar 56e43c4a38 Merge branch 'devel' of github.com:NeutrinoLabs/xrdp into devel 2014-07-26 13:33:44 -07:00
Laxmikant Rashinkar 27055d5762 coverity: improper use of negative value 2014-07-26 13:33:23 -07:00
speidy 0f9bd232d9 common: indent fix 2014-07-26 09:04:22 +03:00
speidy c612683119 common: trans indentation fix 2014-07-26 08:14:19 +03:00
Idan Freiberg df87033489 trans: work on TLS 2014-07-23 15:37:47 +03:00
Idan Freiberg afdf638c7b libxrdp, common: work on TLS mode 2014-07-23 15:31:45 +03:00
Idan Freiberg f0b6c6b1d1 libxrdp: started adding TLS support 2014-07-15 18:29:40 +03:00
Jay Sorg 05a281a3f8 common: trans UDS rights change 2014-05-15 18:04:04 -07:00
Jay Sorg 374633e63f common: no logic change, update comments 2014-03-01 23:26:40 -08:00
Jay Sorg f6fb5a32ed common: added some trans options used in fast path 2014-02-25 20:33:19 -08:00
Jay Sorg 3c218ad3f2 common: try to send data in trans_write_copy 2013-12-04 15:27:49 -08:00
Jay Sorg 25369460a1 log client ip with pid, etc 2013-10-02 16:27:12 -07:00
Jay Sorg fc31ae1f48 trans: reset p when adding to trans list 2013-09-23 19:17:50 -07:00
Jay Sorg 3b743f64eb chansrv: deadlock, add trans copy func 2013-09-23 18:08:22 -07:00
Jay Sorg dfd78c722b chansrv: fix for deadlock 2013-09-23 12:16:52 -07:00
Jay Sorg 39ed446e15 VUL: fix some possible buffer overruns 2013-09-10 16:00:30 -07:00
Jay Sorg e602a28d5c common: transport aware when app is terminating 2013-08-17 13:32:53 -07:00