Commit Graph

16 Commits

Author SHA1 Message Date
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Idan Freiberg 2ee8b2cbbd channels: ssh-agnet: cmake: turn off server side channel by default in `ChannelsOptions.cmake` (#5420)
CMake v3.5.1 throws the following error if this is not set:
```
CMake Error at channels/CMakeLists.txt:48 (if):
  if given arguments:

    "OFF" "OR"

  Unknown arguments specified
Call Stack (most recent call first):
  channels/sshagent/ChannelOptions.cmake:6 (define_channel_options)
  channels/CMakeLists.txt:273 (include)
```
2019-06-03 09:47:35 +02:00
Bernhard Miklautz 9f6abd2701 fix [channels]: remove sshagent server side
The server side channel wasn't tested and does not work this way with
FreeRDP. Rely on the server side channel that come with the RDP
server(s).
2018-12-13 10:17:46 +01:00
Armin Novak a8a6accc15 Fixed compiler warnings. 2018-10-03 15:16:59 +02:00
Armin Novak 2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak feda4e07df Removed linux specific include. 2017-11-20 11:46:09 +01:00
Armin Novak 4ab26a334a Fixed resource cleanup. 2017-11-15 15:56:25 +01:00
Armin Novak 77134d9def Fixed formatting. 2017-11-15 15:56:25 +01:00
Armin Novak f39346ebe5 Fixed leaks and formatting. 2017-11-15 15:56:25 +01:00
Ben Cohen 8d54945b96 Remove underscores from define in sshagent_main.h 2017-11-10 20:16:00 +00:00
Ben Cohen 6093ec62e0 Fix comments at the start of these files and adjust copyrights 2017-11-10 20:16:00 +00:00
Ben Cohen badb70174a Add server side plugin [UNTESTED]
This is based on xrdpapi/xrdp-ssh-agent.c from xrdp PR #867.
2017-11-10 20:16:00 +00:00
Ben Cohen c27541e9ac Add rdpcontext so read thread can report channel error
Also fix copyright dates...
2017-11-10 20:16:00 +00:00
Ben Cohen 639930869a Remove EAGAIN/EWOULDBLOCK from blocking read/write 2017-11-10 20:16:00 +00:00
Ben Cohen 7e262213ca Fix socket fd leak and other changes
1. In connect_to_sshagent() if connect() fails, the socket agent_fd is
   leaked.  It needs to be closed before returning.

2. Fix copyright messages.

3. Make if statement with call to CreateThread() clearer to read.
2017-11-10 20:16:00 +00:00
Ben Cohen 0e90841a18 Forward ssh-agent data between ssh-agent and RDP
Add the sshagent plugin to forward the ssh-agent protocol over an RDP
dynamic virtual channel, just as the normal ssh-agent forwards it over
an SSH channel.  Add the "/ssh-agent" command line option to enable it.
Usage:

Run FreeRDP with the ssh-agent plugin enabled:

   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 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-11-10 20:16:00 +00:00