Commit Graph

42 Commits

Author SHA1 Message Date
matt335672
16c20dc6e3 misc: Fix cppcheck 1.82 + 1.90 warnings 2020-01-19 14:13:47 +00:00
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
2018-10-11 22:09:20 -07: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
speidy
d15d32c593 xrdpapi: change WTSVirtualChannelWrite return values to be consistent with WTSVirtualChannelRead 2017-09-13 11:18:41 +09:00
Pavel Roskin
148afd1170 Rename file_loc.h to xrdp_sockets.h, install it
Include xrdp_sockets.h directly, not through headers.
2017-03-28 00:59:16 -07:00
Pavel Roskin
58c9cb43e9 Make socket directory configurable, don't hardcode /tmp/.xrdp
Use XRDP_SOCKET_PATH in file_loc.h

Don't define any non-socket paths in file_loc.h, they should come from
the makefiles.

Define all paths unconditionally, they should not be defined elsewhere.

Pass XRDP_SOCKET_PATH as environment variable to the backends.
2017-03-17 22:25:05 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
6664aac00f Use "void" for empty argument list in declarations
In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".

C++ treats void and empty list as "no arguments".
2017-01-05 17:27:20 -08:00
Pavel Roskin
c21b9a78f4 Distribute all files except git and github specific data
It is better to distribute a few useless file than not to distribute
needed files.
2016-12-18 00:00:11 -08:00
Pavel Roskin
a370306f75 Get rid of EXTRA_LIBS, use variables with more specific names 2016-10-20 10:43:02 -07:00
Pavel Roskin
5c69f3cd57 Eliminate EXTRA_FLAGS, it's a poor name, use AM_LDFLAGS 2016-10-20 10:43:02 -07:00
Pavel Roskin
0422734fc7 Merge EXTRA_DEFINES and EXTRA_INCLUDES into AM_CPPFLAGS
AM_CPPFLAGS is a documented Automake variable for C preprocessor flags
that should not be overridden when compiling the package.

There is no need to have two additional variables that are ultimately
merged into AM_CPPFLAGS.

Their names are also confusing. EXTDA_DIST is a documented Automake
variable. Everything else that starts with "EXTRA" is not.
2016-10-20 10:43:02 -07:00
Pavel Roskin
aaa89ad4e6 Use const unsigned for hex arrays
Some constants are too big for the signed type.
2016-07-08 04:29:43 +00:00
Pavel Roskin
9057ad0bba Remove unused variables in get_display_num_from_display() 2016-05-06 18:58:16 -07:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Pavel Roskin
59a5fb0ddb Move headers from EXTRA_DIST to sources, sort alphabetically
There should be no functional difference.
2016-02-21 23:06:48 -08:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin
dcab7552db Stop redefining libdir, use moduledir for ${libdir}/xrdp
libdir is for shared and static libraries. Some xrdp libraries are loaded
dynamically from a non-standard directory, so they are used like modules.

Having separate libdir and moduledir would eventually allow to separate
dynamically loaded modules from shared libraries.
2016-02-12 23:52:46 -08:00
Pavel Roskin
5d9dae24c5 xrdpapi: fix MacOS compilation - use SO_NOSIGPIPE instead of MSG_NOSIGNAL 2016-01-30 17:19:09 -08:00
Pavel Roskin
a452d8d36a Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.

INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.
2016-01-29 22:45:00 -08:00
Jay Sorg
040c3a3327 don't use g_free in xrdpapi 2015-12-26 16:07:51 -08:00
Laxmikant Rashinkar
119fd3031c buffer not null terminated 2014-07-26 15:51:41 -07:00
Laxmikant Rashinkar
0915d33d70 coverity: dead code 2014-07-26 15:06:35 -07:00
Laxmikant Rashinkar
fde7be5151 coverity: fixed issue argument cannot be negative 2014-07-23 19:07:38 -07:00
Laxmikant Rashinkar
a990287c46 coverity: fixed unchecked return value from library 2014-07-20 13:14:09 -07:00
Koichiro IWAO
53e360b5ed xrdpapi: Fix comment, no logic change 2013-12-27 08:17:44 +09:00
Jay Sorg
c6fa03102f copyright year update 2013-06-08 10:51:53 -07:00
Jay Sorg
b7af404030 xrdpapi: cast fix 2013-02-11 13:43:20 -08:00
Jay Sorg
d1fc67102a xrdpapi: send for all bytes 2012-12-17 19:06:28 -08:00
Jay Sorg
4f6cbfd3fe xrdpapi: use header for server to client writes 2012-12-17 17:29:24 -08:00
Laxmikant Rashinkar
edf5971cef o in login dialog set sesman-X11rdp as the default module
o added support for video redirection without using TSMF
2012-11-09 19:55:21 -08:00
Laxmikant Rashinkar
5b0eaa4a9b o added support for dynamic virtual channels
o added echo test routine in simple.c for testing DVC using Microsoft's ECHO protocol
2012-09-27 19:48:44 -07: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
Jay Sorg
7539d7271e chansrv: work on dynamic channels 2012-08-08 22:21:32 -07:00
Jay Sorg
9b9d2304fd xrdpapi: got simple test working 2012-08-02 22:32:44 -07:00
Jay Sorg
2aa53cbdd1 xrdpapi: add cplusplus for header 2012-08-02 16:22:01 -07:00
Jay Sorg
97ec29f9ff xrdpapi: complete basic WTSVirtual* functions 2012-08-02 14:39:35 -07:00
Jay Sorg
e9aa5df420 xrdpapi: added library skel 2012-08-02 10:48:59 -07:00
Jay Sorg
0e6210fb13 added xrdpapi 2012-07-28 21:27:12 -07:00