Commit Graph

37 Commits

Author SHA1 Message Date
matt335672 6a5d858dce xrdpapi: Add a way to get client connect status
Functions are added to xrdpapi to allows the connection status
to be determimed. These functions are modelled on the Windows API
functions, but are not compatible with them. In particular, the error
handling is different.

A way for an application to receive events is also provided. At present,
only connect/disconnected events are implemented.
2025-12-15 11:26:21 +00:00
matt335672 d90b9d9316 xrdpapi: Fix memory leak in WTSVirtualChannelOpenEx() 2025-12-15 11:22:54 +00:00
matt335672 b04743066d Fix coverity-reported issues
The errors in sesman/chansrv/chansrv_fuse.c appear to be false positives
caused by allocating xhandle->dir_handle, and then
casting xhandle to an integer in xfuse_handle_to_fuse_handle(), thus
hiding xhandle->dir_handle

For both occurrences, the logic has been simplified and made the same,
and a comment has been added to suppress the error.
2025-01-13 10:27:29 +00:00
matt335672 675dd77807 Parameterise the sockdir with the UID of the user
The top level socket directory is now called XRDP_SOCKET_ROOT_PATH.
Below that are user-specific directories referred to with the
XRDP_SOCKET_PATH macro - this name is hard-coded into xorgxrdp and
the audio modules as an environment variable.

XRDP_SOCKET_PATH now looks like $XRDP_SOCKET_ROOT_PATH/<uid>

XRDP_SOCKET_PATH is only writeable by the user, and readable by the user
and the xrdp process.
2023-10-23 18:14:46 +01:00
matt335672 86d0d0e9fd Addressed review comments 2023-02-13 14:28:29 +00:00
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
matt335672 86c87b6f15 Move get_display_num_from_display to string_calls module 2021-04-13 12:16:00 +01:00
matt335672 e7cb5bd64a Allow DISPLAY=:0 for chansrv and in other modules 2021-04-13 12:15:26 +01: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
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
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 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 92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Pavel Roskin 5d9dae24c5 xrdpapi: fix MacOS compilation - use SO_NOSIGPIPE instead of MSG_NOSIGNAL 2016-01-30 17:19:09 -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