Commit Graph

3361 Commits

Author SHA1 Message Date
Ben Cohen
6fb3fcfc66 Handle EINTR for send() in handle_connection() 2017-10-17 14:34:25 +09:00
Ben Cohen
1d5aa8cc97 Forward ssh-agent data between ssh clients and RDP
Add xrdp-ssh-agent.c which forwards ssh-agent protocol over an RDP
dynamic virtual channel, just as the normal ssh-agent forwards it over
an SSH channel.

Usage:

Run an RDP client with the corresponding plugin enabled; for example
"xfreerdp /ssh-agent ...".

In the remote desktop session run xrdp-ssh-agent and evaluate the output
in the shell as for ssh-agent to set the required environment variables
(specifically $SSH_AUTH_SOCK):

   eval "$(xrdp-ssh-agent -s)"

This is the same as for the normal ssh-agent.  You would typically do
this in your Xsession or /etc/xrdp/startwm.sh.

Limitations:

1. Error checking and handling could be improved.

2. This stays running when the xrdp session closes.  This should be
fixed using a command line argument as for the real ssh-agent.

3. This is only tested on Linux and will only work on systems where
clients talk to the ssh-agent via Unix domain sockets.  It won't
currently work on Windows but it could be ported.
2017-10-17 14:34:25 +09:00
Koichiro IWAO
2411a0be14 log: add log level TRACE
TRACE means more verbose than DEBUG. syslog doesn't have more verbose
level than DEBUG, map TRACE to DEBUG for syslog.
2017-10-13 15:09:33 +09:00
Felix Zhang
eaed9af498 xrdp: corret the config file name in the comment 2017-10-09 21:38:10 +09:00
Koichiro IWAO
00bf62bd42 common: prevent raw use of snprintf 2017-10-03 21:55:08 +09:00
Oscar Salvador
be23682f90 xrdp: get port from configfile in access_control()
This fixes #894
2017-10-03 09:45:24 +09:00
Koichiro IWAO
ced3a4817f xrdp: constify input event type 2017-10-02 09:39:48 +09:00
Koichiro IWAO
c295dd61b8 Update v0.9.4 release date 2017-09-28 11:25:19 +09:00
Koichiro IWAO
e102b7cc8c update NEWS, mention known issues 2017-09-26 15:56:11 +09:00
Koichiro IWAO
ac5987cf13 Prepare release v0.9.4 2017-09-26 15:56:11 +09:00
Koichiro IWAO
d94e43a49e update sumbodules to the latest release 2017-09-26 15:24:33 +09:00
Koichiro IWAO
f9ab4df7f2 common: fix g_write_ip_address() didn't return correct IP address
Fixes: #878.
2017-09-26 10:54:08 +09:00
cocoon
8ded88a0c6 Fixes #414 2017-09-17 18:03:07 +09:00
speidy
36eda1bcbb tcutils: fix WTSVirtualChannelWrite return codes check according to API change 2017-09-13 11:18:41 +09:00
speidy
fad2c57cd6 xrdpvr: adjust xrdpvr_write_to_client to xrdpapi API change 2017-09-13 11:18:41 +09:00
speidy
d15d32c593 xrdpapi: change WTSVirtualChannelWrite return values to be consistent with WTSVirtualChannelRead 2017-09-13 11:18:41 +09:00
Koichiro IWAO
26394870e5 sesman: delete socket files when session exits 2017-09-13 09:04:58 +09:00
Koichiro IWAO
df29ea3ad9 travis: Unbreak travis build
since Ubuntu Precise (12.04) is retired September 2017. Now build test
is run on Ubuntu Trusty (14.04). A trivial fix for requisite packages
needed.
2017-09-07 11:35:06 +09:00
Koichiro IWAO
e6b7d12191 xrdp: accept full path for ls_background_image
because ls_logo_filename accepts full path.
2017-09-05 17:17:33 +09:00
Koichiro IWAO
9ca52b05da add Belgian keyboard 2017-09-01 10:08:26 +09:00
Koichiro IWAO
a094c65aaf Release v0.9.3.1 2017-08-16 14:07:32 +09:00
Koichiro IWAO
22dc148802 instfiles: don't include generated *.services files in distribution
Solves #848.
Pointed out by: Fuminobu TAKEYAMA (@ftake)
2017-08-16 13:50:52 +09:00
Jay Sorg
d9b929c185 chansrv: sound, fdk-aac, avoid 1 item array items 2017-08-04 17:24:57 -07:00
Jay Sorg
152318ad7c use pkg-config to configure with fdk-aac 2017-08-04 17:24:57 -07:00
Jay Sorg
4f91a52109 chansrv: sound, remove a do not know and a comment 2017-08-04 17:24:57 -07:00
Jay Sorg
021a78f4c6 chansrv: sound, use WAVE_FORMAT_AAC not WAVE_FORMAT_AAC_MS 2017-08-04 17:24:57 -07:00
Jay Sorg
bf0d56c314 chansrv: sound, add aac 2017-08-04 17:24:57 -07:00
Jay Sorg
8ac35d7ed1 chansrv: sound, handle skips in audio acks 2017-08-04 17:24:57 -07:00
matt335672
4023aa7f1c xfuse_create_share() called before xfuse_init()
* Initialise inode table in `xfuse_create_share()` if necessary
* Add guard to `xfuse_init_xrdp_fs()` to prevent double initialisation of the inode table
2017-08-03 11:50:31 +09:00
Koichiro IWAO
4d14f344fd fix indent, no logic change 2017-08-01 08:40:30 +09:00
Koichiro IWAO
b34fc6da55 don't use hard coded constant values 2017-08-01 08:40:30 +09:00
Koichiro IWAO
df32f74519 use g_free() 2017-08-01 08:40:30 +09:00
Koichiro IWAO
04187945a8 move base64 functions to base64.c 2017-08-01 08:40:30 +09:00
Koichiro IWAO
c40baf03e6 docs: document base64 prefill credentials 2017-08-01 08:40:30 +09:00
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.
2017-08-01 08:40:30 +09:00
Koichiro IWAO
eae5cdf1fd pass through except for the first '='
if "foo=ba=r" is found in ini files, it should be parsed like this.
      key : foo
    value : ba=r
2017-08-01 08:40:30 +09:00
Koichiro IWAO
d57e02626d add base64_decode function 2017-08-01 08:40:30 +09:00
Koichiro IWAO
05ef6d104e sesman: search pam files also in ${sysconfdir}/pam.d
as some operating system such as FreeBSD searches not only `/etc/pam.d`
but also `/usr/local/etc/pam.d` [1].

[1] https://www.freebsd.org/cgi/man.cgi?query=pam.d&sektion=5
2017-07-26 11:34:01 +09:00
Koichiro IWAO
e990dd4263 chansrv: remove trailing space 2017-07-25 11:40:04 +09:00
Koichiro IWAO
ca24572fd5 chansrv: use switch-case to support more codecs 2017-07-25 11:40:04 +09:00
Koichiro IWAO
dbaf23e93b chansrv: constify wFormatTag 2017-07-25 11:40:04 +09:00
Koichiro IWAO
9f8a902476 Add a pam file for FreeBSD
as existing xrdp-sesman.unix doesn't suit FreeBSD.
2017-07-21 14:04:50 +09:00
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.
2017-07-20 09:13:06 +09:00
Ian Geiser
324a334315 append a / to ensure the full path is created even when the config variable lacks a trailing / 2017-07-19 10:35:37 +09:00
Koichiro IWAO
aaa40edefb NEWS: pulralize glitches 2017-07-14 21:22:02 +09:00
Koichiro IWAO
aa0721a90e common: fix more glitches in IPv4 initialization 2017-07-14 21:21:15 +09:00
Ian Geiser
4b87548b71 Use g_create_path instead of g_create_dir
Rename g_mk_temp_dir to g_mk_socket_path
2017-07-14 20:52:38 +09:00
Koichiro IWAO
59a7e8aedf fix typo (copy & paste mistake) 2017-07-13 14:34:19 +09:00
Koichiro IWAO
502998b8fe Update release date 2017-07-13 14:34:19 +09:00
Koichiro IWAO
7ee187f35b Update NEWS 2017-07-13 14:34:19 +09:00