Commit Graph

7 Commits

Author SHA1 Message Date
matt335672 78fa1c15b2 Replace select() system call with poll()
poll() is specified in POSIX.1-2001 as a simpler interface for
multiplexed file descriptors than select(). It also provides more
functionality.

This PR replaces the select() calls used in xrdp with poll()
equivalents.
2023-02-13 14:28:29 +00:00
aquesnel d28f9cd75a
Unify logging in xrdpapi/* (#1812)
Migrating logging to LOG() and LOG_DEVEL() in xrdpapi/* (#1812)
2021-03-01 10:09:26 +00:00
matt335672 16c20dc6e3 misc: Fix cppcheck 1.82 + 1.90 warnings 2020-01-19 14:13:47 +00:00
Ben Cohen b9ff75e50e xrdp-ssh-agent: Remove vim modeline 2017-10-17 14:34:25 +09:00
Ben Cohen a2b008f63e xrdp-ssh-agent.c: Fix braces for coding style 2017-10-17 14:34:25 +09:00
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