Commit Graph

686 Commits (c15cd91198b7393cf7c9d2576f1762a22acc017f)

Author SHA1 Message Date
jsorg71 ae1514c167
dynamic virtual channel improvements
remove not used chansrv <-> xrdp messages
move static channel disable control into libxrdp
remove some blocking read, write chansrv calls
add drdynvc calls to libxrdp
add drdynvc calls to chansrv
channel cleanup
6 years ago
Idan Freiberg 28d1fa7620
Merge pull request #1192 from hate-m-dollarsign/devel
xrdp: Use configured values instead of hardcoded ones in login_wnd inputs.
7 years ago
Koichiro IWAO 171f8e79ed
xrdp: deprecate TLSv1 and TLSv1.1
Most websites disabled TLSv1 (1.0) and TLSv1.1 since March 2018
[1][2][3]. It is HTTPS context but there's few differences between HTTPS
and other TLS connections. Users can whenever re-enable these deprecated
TLS versions by editing xrdp.ini but not enabled by default.

[1] https://www.globalsign.com/en/blog/disable-tls-10-and-all-ssl-versions/
[2] https://www.thesslstore.com/blog/deprecation-tls-1-0-1-1-underway/
[3] https://www.digicert.com/blog/depreciating-tls-1-0-and-1-1/
7 years ago
Koichiro IWAO 1ad8cbb2a0
Document TLSv1.3 support 7 years ago
jsane fadbd20baf xrdp: Use configured values instead of hardcoded ones in login_wnd inputs.
Configured ls_label_width and ls_input_width currently only apply to the combo l
abel and dropdown. Other labels and inputs (username, password, port, ...) use hardcoded defaults.

Also had to change the default label width; for the previous value of 60, "username" ends up just a few pixels too wide.
7 years ago
Koichiro IWAO c0c7c3f106
xrdp: unify inconsistent mixed use of
* configure params
* configure options
* configure string
7 years ago
Koichiro IWAO be05afb30b
xrdp: print configure options to --version more pretty 7 years ago
Jay Sorg 349616a35d add ipv6only to configure echo and add configure parameter to xrdp -h output 7 years ago
metalefty f52f632e21
Merge pull request #1096 from metalefty/version_info
Show OpenSSL version to --version
7 years ago
Koichiro IWAO 2eb4be426b
xrdp: show which CLI option is unknown to xrdp 7 years ago
Koichiro IWAO b2b42d28f3
xrdp: add OpenSSL version to --version
While here, cleanup --help,  --version, and when unknown option.
7 years ago
Koichiro IWAO 48aafc1866
xrdp: xrdp should exit with error code when unknown CLI option given 7 years ago
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.)
7 years ago
fbourqui 3d9e7db849
Update xrdp_keyboard.ini
Add the missing Swiss French rdp_layout_ definitions, ch(fr) in X11
7 years ago
Vraiment 9ed5243de9 Make xrdp.ini to be dynamic for each operating system 7 years ago
Jay Sorg f763cb3788 fix for zombie processes sometimes appearing 7 years ago
Jay Sorg acd05f365f xrdp: xrdp_encoder.c fix compile when XRDP_RFXCODEC is not defined 7 years ago
Jay Sorg a64cb81a36 xrdp: fix some leaks in xrdp_encoder.c 7 years ago
Koichiro IWAO b17c45d86f
fix potential fd leak
In most cases, checking fd > 0 is not valid. open(2) returns -1 on
error, 0 on stdin, 1 on stdout, 2 on stderr, >2 . The border should be
between -1 and 0. Additionally, between 2 and 3.

Pointed out by: #919
7 years ago
Koichiro IWAO 942bb6316a add comment on sessions xrdp.ini 7 years ago
rkantos cdba988f52 Update xrdp_keyboard.ini
Add the missing? Finnish rdp_layout_ definitions. Makes my install now work with Finnish keyboard layout. (same as Swedish)
7 years ago
Koichiro IWAO 8d951ab02e xrdp_listen: suppress log when TRANS_STATUS_DOWN
The log is always logged when clients are disconnecting even though
nothing unusual is happening. This scares users too much. Actually,
some users created a issue on GitHub with the following log. It will
lose focus from the real error.

> [ERROR] Listening socket is in wrong state, terminating listener
7 years ago
Koichiro IWAO fb8f0adcc4 remove useless braces 7 years ago
Jay Sorg 54285d26dd remove empty crc16.h file 7 years ago
Jay Sorg 26507644e3 vsock, move some defines 7 years ago
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.
7 years ago
Koichiro IWAO 2475893402 Constify extended mouse events 7 years ago
Koichiro IWAO 27aef96e81 Constify mouse event flags, use the MS name for constants 7 years ago
Koichiro IWAO 8e7e54e49f xrdp_wm: handle horizontal mouse wheel events 7 years ago
Koichiro IWAO 903a2bf83a xrdp_wm: make mouse button 6 and 7 act like button 4 and 5
because 6 and 7 are horizontal scroll. They should acts as same as
vertical scroll.
7 years ago
Soedarsono 3c3eb9ed73 Add dvorak keyboard layout 7 years ago
Felix Zhang eaed9af498 xrdp: corret the config file name in the comment 7 years ago
Oscar Salvador be23682f90 xrdp: get port from configfile in access_control()
This fixes #894
7 years ago
Koichiro IWAO ced3a4817f xrdp: constify input event type 7 years ago
cocoon 8ded88a0c6 Fixes #414 8 years ago
Koichiro IWAO e6b7d12191 xrdp: accept full path for ls_background_image
because ls_logo_filename accepts full path.
8 years ago
Koichiro IWAO 9ca52b05da add Belgian keyboard 8 years ago
Koichiro IWAO b34fc6da55 don't use hard coded constant values 8 years ago
Koichiro IWAO df32f74519 use g_free() 8 years ago
Koichiro IWAO 04187945a8 move base64 functions to base64.c 8 years ago
Koichiro IWAO a89cb93bc7 decode base64 login window parameter
such as prefill username and password:
    username=ask{base64}YmFzZTY0
    username={base64}YmFzZTY0
    password=ask{base64}YmFzZTs2NCFwYXNzd29yZCM=
    password={base64}YmFzZTs2NCFwYXNzd29yZCM=

';', '#', '!' means comment in .ini files. If prefill username or
password contains such symbols, these can be provided base64 encoded.
8 years ago
Ben Cohen 8b4d057af2 Allow UDS connection from non-root users
If you run xrdp with a Unix Domain Socket (UDS) for the port specified in
/etc/xrdp/xrdp.ini then only root can connect to it.

Test case:

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

2. Restart xrdp.

3. Run the following, as a non-root user.

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

Expected behaviour: rdesktop starts up and displays the logon dialog.
Observed behaviour: rdesktop exits with "ERROR: Connection closed" and
socat exits with "Permission denied".  (But it suceeds if root runs
socat.)

UDS files are created by trans_listen_address() and given permissions
0660, so only root can connect to it.  In this case, for the RDP client
connection, it it fine for any user to connect so it should be given
permissions 0666.

Note that this is only relevant when the port in /etc/xrdp/xrdp.ini has
been set to create a UDS instead of a TCP socket.  When a TCP port is
created any user (including remote users, unless the loopback interface
is used) can connect so this is not less secure.
8 years ago
Koichiro IWAO b83b5510f4 Fix Xvnc backend disconnects when some data copied to clipboard
Should fix #755.
8 years ago
Koichiro IWAO 5def0596e0 int function should return 8 years ago
Koichiro IWAO 1d89000d90 xrdp: exit main process with failure status if listen failed (daemon mode) 8 years ago
Koichiro IWAO 7aad2c83c6 xrdp: exit with failure status if listen failed (foreground mode) 8 years ago
Koichiro IWAO 252cb20365 xrdp: xrdp_listen_main_loop pass through trans_listen_address return value 8 years ago
Koichiro IWAO 606984baad add Spanish keylayout 8 years ago
Koichiro IWAO 0299d64fa8 sort xrdp_keyboard.ini 8 years ago
Ben Cohen bb9756f6c5 Fix UK/GB keyboard layout
The UK/GB keyboard doesn't work properly connecting to xrdp with xorgxrdp.
It does work when connecting to xrdp with x11vnc, however.

This is because the layout is not declared in xrdp_keyboard.ini.  It needs
to be called "gb" not "uk".  (There are other layouts that have
km-nnnn.ini files that aren't declared in xrdp_keyboard.ini, so they might
have the same bug, but I haven't tested that.  This is analagous to the
commits for the "ch" and "pl" layouts.)

Test case:

1. Use a PC with the UK/GB keyboard layout.

2. Create /etc/xrdp/startwm.sh as follows:

     #!/bin/sh
     export LANG=en_GB.UTF-8
     export MDM_LANG=en_GB.UTF-8
     export XTERM_LOCALE=en_GB.UTF-8
     xterm
     exit 0

3. Connect using rdesktop to localhost (from a session where the same
   environment variables are defined).

4. Test layout-specific keys such as:
      \ (backslash)
      | (bar)
      # (numbersign)
      ~ (asciitilde)
      £ (sterling: Shift-3)
      € (EuroSign: AltGr-4)

These keys should produce the appropriate symbol but they don't.  With
the change in this commit the keys produce the correct symbol.
8 years ago