Commit Graph

77 Commits

Author SHA1 Message Date
matt335672
c9a2039858 Move and rename xrdp_load_keyboard_layout()
xrdp_load_keyboard_layout() is used exclusively by the xup module to
work out the parameters to pass to xorgxrdp for XKB. This function
does not need to be called locally from the SEC module.

This commit moves the function to xrdp/lang.c and renames it as
xrdp_init_xkb_layout(). The module interface is modified so that xup can
call this function. Other modules do not need to call it.
2024-08-05 10:44:10 +01:00
firewave
c7070b95af xrdp/neutrinordp: fixed -Wmissing-prototypes compiler warning
Co-authored-by: matt335672 <30179339+matt335672@users.noreply.github.com>
2024-04-23 18:46:37 +02:00
matt335672
bedaf990ac Update neutrinordp module
Neutrinordp module now compiles with updated monitor resize
interface
2024-02-15 16:48:13 +00:00
matt335672
ae836fb543 Update module interfaces with new calls for resizing
This commit DOES NOT compile.

This change alters these module interface calls:-
1) mod_server_monitor_resize() (Call from xrdp to module). Updated.
2) server_reset() (Call from module to xrdp). Replaced.

The mod_server_monitor_resize() call is updated :-
1) to allow a monitor list to be passed in for a multimon resize
2) with an 'in_progress' return value which tells the caller whether or
   not to expect a callback.

The server_reset() call served two purposes up until now:-
1) To allow a module to resize a single monitor session. There
   is no way to request a multi-monitor resize from the module
2) (with bpp == 0) To signal to the mm resize state machine that
   a server screen resize hsa finished.

This is split into two calls:-
1) client_monitor_resize() to allow a mdule to request a
   multimon resize.
2) server_monitor_resize_done(). This is called by a module
   when a resize is completed.
2024-02-15 16:48:13 +00:00
metalefty
45fd497645
Merge pull request #2891 from neutrinolabs/gfx_mainline_merge_work
Gfx mainline merge work
2024-02-08 21:50:16 +09:00
Koichiro Iwao
47d4ab1339 Apply astyle 3.4 code formatter 2024-02-08 15:52:54 +09:00
matt335672
d9783a9529 Don't pass drdynvc to neutrinoRDP
Since v0.9.9, xrdp has assumed that the "drdynvc" static virtual
channel is available for its exclusive use. With GFX support, it
is necessary to codify this to prevent this sequence of operations:-

- NeutrinoRDP target sends DVC Capabilities Request PDU
- target responds wih DVC Capabilities Response PDU
- xrdp processes this, starting the GFX virtual channel again

In the future, if NeutrinoRDP requires access to virtual channels,
data may somehow need to be passed through to the target while being
parsed and handled appropriately within xrdp.
2024-01-31 19:08:29 -05:00
matt335672
8af430e197
Fix regression in using window message names (#2925)
FreeRDP defines macros WM_LBUTTONUP, WM_LBUTTONDOWN, WM_RBUTTONUP
and WM_RBUTTONDOWN. These conflict with the definitions we have in
xrdp_constants.h. Because the FreeRDP system includes followed the local
includes however, the compiler did not emit a diagnostic for this -
see gcc bug #16358.

This PR rearranges the includes for NeutrinoRDP so the macro
redefinitions are flagged by the compiler.
2024-01-31 19:06:59 -05:00
matt335672
c52a173db0 Use symbolic constants in the modules for WM events 2023-11-27 15:42:24 +00:00
Naruhito
e520ce3a5d Proxy extended mouse button 8, 9 events
https://github.com/neutrinolabs/xrdp/pull/2860#issuecomment-1818705074
2023-11-27 15:12:01 +00:00
matt335672
5ed9b96530 Add missing include guards 2023-01-31 09:30:36 +00:00
a1346054
7fe18cc1c0
fix typos 2022-09-03 02:01:48 +00:00
matt335672
79bec8110c Unify connection fields for the connected client
The connected client is currently described in two places in
the xrdp_client_info structure:-

1) In the connection_description field. This was introduced as
   field client_ip by commit d797b2cf49
   for xrdp v0.6.0

2) In the client_addr and client_port fields introduced by commit
   25369460a1 for xrdp v0.8.0

This commit unifies these two sets of fields into a single
set of fields describing the connection IP and port (for
AF_INET/AF_INET6 connections only) and a connection description
for all connection types.

The code in os_calls to provide client logging has been simplified
somewhat which should make it easier to add new connection types (e.g.
AF_VSOCK).

The old connection_description field used to be passed to sesman to
inform sesman of the IP address of the client, and also to provide
a string for 'C' field session policy matching. 'C' field session policy
matching does not actually need this string (see #2239), and so now only
the IP field is passed to sesman.
2022-05-18 12:35:07 +01: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
matt335672
d2be050911 Fix neutrinordp regression caused by bd9147d18f 2022-03-29 10:40:32 +01:00
matt335672
0416d32114 Neutrinordp: Add more user info on connect failure 2021-11-25 15:45:17 +00:00
matt335672
b2e39049cb Make msg arg to server_msg() consistently const 2021-11-25 13:26:51 +00:00
matt335672
0b5445b676 Remove unnecessary error from neutrinordp log 2021-10-12 14:37:28 +01:00
matt335672
fd4f19e40a Move erroneous parameter processing section 2021-07-20 12:42:37 +01:00
TOMATO-ONE
e3ffad77ca neutrinordp: Allow fixed keyboard lauout information to be sent to remote. #1933 2021-07-20 01:08:45 +09:00
TOMATO-ONE
e0a482fbfc neutrinordp: Allow keyboard layout information to be sent to remote. #1933 2021-07-20 00:10:53 +09:00
matt335672
20ec03dbe0
Merge pull request #1900 from matt335672/issue1885
Rework VNC text clipboard interface (#1900)
2021-07-07 09:22:57 +01:00
TOMATO-ONE
c9bab54f76 Allow users or administrators to configure the mstsc experience settings. 2021-06-26 20:56:39 +09:00
matt335672
949a81443b Add server_chansrv_in_use() to module interface 2021-06-08 14:11:17 +01:00
matt335672
148000c46b
Merge pull request #1899 from TOMATO-ONE/neutrinordp_add_channel
Allow common channel settings to be overridden for modules as well as chansrv (#1899)
2021-05-28 11:22:08 +01:00
matt335672
52a52daddd Split development option into separate things 2021-05-28 10:57:12 +01:00
TOMATO-ONE
604fa30083 Common channel settings can be overridden for each session type in NeutrinoRDP. 2021-05-27 23:53:30 +09:00
matt335672
b95e14ed2e Removed extra space, breaking astyle check 2021-05-26 09:47:04 +01:00
matt335672
ce10d3a1a8
Merge pull request #1879 from aquesnel/check_formatting
Add checking the code formatting with astyle during CI builds (#1879)
2021-05-26 09:14:59 +01:00
TOMATO-ONE
c6fcb16361 Log the IP address, port, and user name of the NeutrioRDP Proxy connection. #1873
Add comments to [vnc-any] and [neutrinordp-any] secion in xrdp.ini.in .

Logging NeurionoRDP Proxy disconnect.
2021-05-12 22:28:07 +09:00
Alexandre Quesnel
52707ac686 Fixing formatting with astyle 2021-05-08 16:58:11 +00:00
Koichiro IWAO
217edb141d
neutrinolabs: do not log valid parameters as unknown 2021-04-30 00:38:44 +09:00
Koichiro IWAO
aad14384cc
neutrinordp: avoid pampassword leakage
The leakage does not occur in the most usual use case of xrdp.
It occurs in NeutrinoRDP proxy mode with PAM authentication enabled.

Reported by @TOMATO-ONE
2021-04-29 22:16:31 +09: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
920d1c8331
Unify logging in neutrinordp/* (#1807)
Migrate logging to LOG() and LOG_DEVEL() in neutrinordp/* (#1807)
2021-02-22 09:48:55 +00:00
matt335672
5523847540 Allow FuseMountName for chansrv to be absolute path 2020-12-21 12:36:31 +00:00
Matt Burt
1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
matt335672
23b58aeb70 Fix compilation warnings/errors in xrdp-neutrinordp.c 2020-09-07 09:38:23 +01:00
bolkedebruin
5cd36c511c Set max character buffer len to 512 per MS specification
The MS specs determine that the character buffer lenngths
for usernames, domains, passwords, alternate shells, etc
can be up to 512 characters including the mandatory null
terminator.
2020-08-17 10:35:35 +02:00
Jay Sorg
eb56683df0 update the module version 2019-04-25 14:54:25 -07:00
Jay Sorg
c3f7f6bd84 neutrinordp: implement suppress output 2019-04-25 14:54:25 -07:00
daixj
fcb1b825c5 neutrinordp: don't enable remote_app if the INFO_RAIL flag is not set 2018-11-23 17:18:26 +08:00
cocoon
84c160725a workaround for corrupted display with W2K8
workaround for corrupted display like black bars left of cmd with W2K8
2017-12-18 10:39:42 +09: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
speidy
264aad7603 neutrinordp: add session_info 2017-01-15 08:24:59 +02: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
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