Commit Graph

37 Commits

Author SHA1 Message Date
Jay Sorg
0bc7803eaa add TCP V4 and V6 only socket functions 2019-06-29 23:59:18 -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
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
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
Idan Freiberg
19375dda7a Merge pull request #426 from metalefty/log-tls-version-and-cipher
TLS: log TLS version and cipher
2017-01-16 07:26:51 +02:00
Pavel Roskin
f1a521204a Remove redundant function declarations 2017-01-11 23:25:42 -08: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
6c23b85593 add timeout to trans_get_wait_objs_rw 2015-07-13 01:10:48 -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
Jay Sorg
386512c0ed common: fix some warning for TLS 2014-07-31 16:46:58 -07:00
Jay Sorg
abf5549524 common: indent, not logic change 2014-07-25 21:21:48 -07: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
148c1f858c common: indent, no logic change to trans.h 2014-04-20 20:24:05 -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
1deac46fdc common: add trans_get_wait_objs_rw to header 2013-12-04 15:26:23 -08:00
Jay Sorg
25369460a1 log client ip with pid, etc 2013-10-02 16:27:12 -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
e602a28d5c common: transport aware when app is terminating 2013-08-17 13:32:53 -07:00
Jay Sorg
c6fa03102f copyright year update 2013-06-08 10:51:53 -07:00
ArvidNorr
a2bbbd8cc3 Display PAM error in gateway setup, use domain name as IP/DNS, changed how the socket is closed 2013-01-16 01:28:35 -08:00
Laxmikant Rashinkar
1123323fda o moved from GNU General Public License to Apache License, Version 2.0
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00
norrarvid
a45f993bfe added comments, added define, removed unused inparameter 2012-05-29 12:46:56 +02:00
Jay Sorg
1e8b5ea2cd bind to specific address 2010-10-19 21:23:13 -07:00
jsorg71
27e097663f improve trans 2010-05-04 07:37:22 +00:00
jsorg71
2a7c40dad8 add unix socket to trans 2009-09-05 03:29:43 +00:00
jsorg71
6c5f82fd04 update copyright year 2009-02-02 08:01:44 +00:00
jsorg71
643e22a6e5 added trans files 2008-08-22 06:08:11 +00:00