Commit Graph

140 Commits

Author SHA1 Message Date
matt335672 c52a173db0 Use symbolic constants in the modules for WM events 2023-11-27 15:42:24 +00:00
Koichiro IWAO 2b0c903afe vnc: add mouse button 6, 7, 8 support 2022-11-14 22:23:29 +09:00
Koichiro IWAO 70bc5ea092 vnc: Constify existing use of magic numbers 2022-11-14 22:23:29 +09:00
a1346054 7fe18cc1c0
fix typos 2022-09-03 02:01:48 +00:00
matt335672 275eaf7683 Rework transport connect logic
There are a number of ways the existing transport connect logic in
trans_connect could be improved for POSIX compatibility, and also
slightly tidied up:-
1) The same socket is re-used for multiple connect attempts following
   failure which isn't behaviour defined by POSIX.1-2017 (although it
   works on Linux).
2) An asynchronous connect is started, and then after a short
   delay connect() is called again on the same socket. POSIX.1-2017
   is clear that in this situation EALREADY is returned before the
   connection is established, but is silent on the behaviour expected
   when the connection is established. Returning success is an option,
   but so is returning EISCONN. The current code assumes the connect()
   call will succeed.
3) The code contains two virtually identical, quite complex loops for
   TCP and UNIX sockets, differing only in the calls to create a socket
   and connect it.
4) trans_connect() contains looping and retry logic, but this isn't
   seen as sufficient by the chansrv connect code in xrdp/xrdp_mm.c and
   the Xorg connect code in xup/xup.c. Both of these implement their own
   looping and retry logic on top of the logic in trans_connect(),
   resulting in slightly unpredictable behaviour with regard to
   timeouts.
5) A socket number can technically be zero, but in a couple of places
   this isn't allowed for.

This PR attempts to correct the implementation of trans_connect(),
and also to simplify the areas it is called from.

As part of the PR, the signature of the server_is_term member of the
xrdp module interface is changed to match the signature expected by the
is_term member of a struct trans. This allows for trans_connect()
in xrdp modules to directly access g_is_term() within the main xrdp
executable. At the moment this functionality is only used by the xup
module.
2022-03-31 20:48:07 +01:00
Christopher Pitstick bd9147d18f Updating to refactor xrdp_client_info
- Eliminate duplicaiton for display_size_description
- monitorCount needs to be uint32_t
- width/height -> session_width/session_height
- Update CLIENT_INFO_CURRENT_VERSION
- Also some misc unit test updates.
- Minor log updates.
2022-03-27 16:38:32 -04:00
matt335672 e6c098e750 Remove s_check() macro 2022-02-09 10:18:15 +00:00
matt335672 d02059d967 Add missing ssl_sha1_clear()/ssl_md5_clear() calls 2022-01-20 16:43:00 +00:00
matt335672 ab0e141fa9
Merge pull request #2011 from matt335672/unify_scpv0_code
Unify scpv0 code #2011
2022-01-05 11:06:42 +00:00
matt335672 67bf23feee Fix gcc11.1 uninitialised var warning 2022-01-04 10:09:33 +00:00
matt335672 8b9b22c773 Create shared GUID module to simplify session guid handling 2021-11-25 13:29:55 +00:00
matt335672 15b7f18ede Minor memory leaks found with valgrind 2021-10-21 15:24:39 +01:00
matt335672 0c605a3cc4
Merge pull request #2014 from matt335672/xrdp_leaks
Fix definitely lost memory leaks #2014
2021-10-20 10:23:09 +01:00
matt335672 0b5445b676 Remove unnecessary error from neutrinordp log 2021-10-12 14:37:28 +01:00
matt335672 b0f3b13cff Fix minor memory leaks 2021-10-11 19:30:47 +01:00
matt335672 ae45344a45 Add missing rfb.c to the VNC module makefile 2021-09-08 09:46:29 +01:00
matt335672 ce27e25dcc Rename misnamed function get_eds_status_msg 2021-09-06 10:33:09 +01:00
matt335672 f55a8fbfc5 Cater for RFB clip size of zero bytes 2021-08-05 16:06:10 +01:00
matt335672 87bbfd96ca Use symbolic names for static virtual channel name strings 2021-06-08 14:11:17 +01:00
matt335672 f52d038d3e Don't tell the RDP client about unchanged clip data from the RFB side 2021-06-08 14:11:17 +01:00
matt335672 fe28af93e8 Split up vnc.c into modules and re-implement clipboard functions 2021-06-08 14:11:17 +01:00
matt335672 949a81443b Add server_chansrv_in_use() to module interface 2021-06-08 14:11:17 +01:00
matt335672 52a52daddd Split development option into separate things 2021-05-28 10:57:12 +01:00
Alexandre Quesnel 52707ac686 Fixing formatting with astyle 2021-05-08 16:58:11 +00:00
Christopher Pitstick deb66ce766 Resolution switching without reconnecting.
- Based on https://github.com/jsorg71/xrdp/tree/dynamic_monitor
- Tested with xorgxrdp
- Tested with vnc
- Only works with single monitor.
- Update documentation to clarify the difference between MSTSC and
Microsoft Remote Desktop.
- Does not include compatibility with /gfx at this time, which is still
in testing.
- Updates to include ms-rdpedisp.h header for the 2.2.2 specification of
the protocol.
- Adds new dynamic_monitor_layout struct that shares the number of
monitors with xrdp_client_info.h
- Does not allow for BPP changes because the RDP protocol doesn't
support it.
- Option to disable feature as NeutrinoRDP doesn't support it (It was
based on FreeRDP 1.0.1 which didn't yet have this feature.)
- Add CLIENT_MONITOR_DATA_MAXIMUM_MONITORS constant and reference
spec definition.

Depends on https://github.com/neutrinolabs/xorgxrdp/pull/183
2021-04-22 01:34:03 -04:00
aquesnel def72ac4be
Unify logging in vnc/* (#1811)
* Migrating logging to LOG() and LOG_DEVEL() in vnc/* (#1811)
2021-03-01 10:11:11 +00:00
matt335672 0a1a8f40e5 Moved a lot of string funcs to string_calls module 2020-12-22 11:57:24 +00:00
Matt Burt 1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
matt335672 3c4b42b1aa Implemented resize and multimon support for VNC backend 2020-06-04 15:10:35 +01:00
Jay Sorg eb56683df0 update the module version 2019-04-25 14:54:25 -07:00
Jay Sorg 4cbf84d99b vnc: implement suppress output 2019-04-25 14:54:25 -07:00
Vraiment 4cee6726f8 Make changes to generate dylibs in mac again 2018-01-30 01:21:07 -08:00
Pavel Roskin 6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin b8ed23daab Constify the value argument to mod_set_param 2017-01-11 11:59:11 -08:00
Pavel Roskin f25659d2ee Suppress versioning for modules, tell libtool they are modules
Versioning is for libraries. Modules are not libraries; no code is linked
against them.

Libtool makes sure the modules can be opened by dlopen(). That is already
true for ELF format, but other file formats may need special processing.
2017-01-06 10:52:44 -08:00
volth 26a26ef906 fix build with --enable-xrdpdebug=yes 2017-01-04 19:20:44 +00:00
volth 37b4a14b54 fix build with --enable-xrdpdebug=yes 2017-01-04 13:00:01 +00:00
Pavel Roskin a8fcbf8c2d Fix support for 32-bpp clients connecting to 16-bpp VNC 2016-12-09 08:43:07 -08:00
Jay Sorg 9a517b34f0 vnc: code cleanup 2016-12-04 15:39:10 -08:00
Jay Sorg 57905d71ad vnc: change password file to use guid hash 2016-12-03 23:12:48 -08:00
Pavel Roskin ace7d2c822 Declare unified module interface and use it in modules
This fixes loading modules compiled with a C++ compiler. Remote thandle
type, it's unused. Use tintptr for module data. Don't cast pointers to
long, they won't fit on Win64.
2016-07-08 05:09:09 +00:00
Pavel Roskin d1efb0d5ba Fix signed to unsigned comparisons reported by g++ 6.1.0 2016-07-08 04:29:51 +00:00
Pavel Roskin aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin 77b380c0b5 Fix format warnings in log_message() calls 2016-06-21 16:30: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 a91a285734 vnc: enable 32 bpp support for Xvnc, it actually works 2016-02-10 09:30:23 -08:00