The start session method is reworked to pass a response back to the
client.
If the method was successful, a session list entry is created. This
is different to the provious behaviour, where we created the
session list entry unconditionally.
This new arrangement means that we need a different way to avoid
a race condition where two users may try to create a session at the
same time, and end up with the same display. We do this by keeping
track of newly allocated displays as part of the SCP connections. When
we allocate a display, the SCP connection displays are also taken
into account.
This type can be used to store sets of integers. It is intended to
be used to keep track of the display numbers allocated to sessions and
SCP connections.
A test suite for the new type is also added.
The data in 'struct xrdp_client_info' which is shared with xorgxrdp
is separated out into a separate structure. This makes it simpler to
change 'struct xrdp_client_info' without affecting xorgxrdp.
From https://github.com/cktan/tomlc99, merge commits after
894902820a3ea2f1ec470cd7fe338bde54045cf5 (2022-09-12) up to and including
df627177cd1e80176c7a5245f26fd3b8e6187368 (2025-05-01)
The Latvian keyboard corresponding to code 0x426 is totally different
from the keyboard for 0x10426 (Latvian(QWERTY)) and 0x20426
(Latvian(Standard)). We set up new definitions for 0x426 and 0x10426 and
symlink 0x20426 to 0x10426.
1) In FIPS mode, Classic RDP security is not allowed at all.
2) In FIPS mode xrdp-keygen creates an empty file
3) Documentation wording improved around the security_level setting
4) Logging improved around the security negotiation
5) Warnings now generated if Classic RDP security is negotiated
1) Remove 'magic numbers' related to static channel name lengths, and
replace with CHANNEL_NAME_LEN, or CHANNEL_NAME_LEN+1, as appropriate.
2) Always add static channel definitions, even if they are malformed.
3) Log channels which the client sends, which aren't named in
the [Channels] section of xrdp.ini.
(cherry picked from commit 9092d898b7dceda713bd05b296ea8e8213ee614b)
Cater for xrdp_mm_get_value() returning NULL in a couple of places.
Also:-
- The function parse_chansrvport() now checks that passed-in value
isn't NULL.
- Unnecessary uses of g_strncpy replaced with strlcpy()
These Coverity warnings all relate to the user of g_setenv() where the
return result isn't checked.
An additional void function g_setenv_log() is provided which logs
failures to set environment variables, and returns no status. This is
used in all the places where g_setenv_is currently called.
The datasize variable is an unsigned in, so comparing it to < 0 will
never be true. There is also a printf sequence for the variable which
should be %u rather than %d
Missing break statement in a switch intoduced by commit
54acca43cf
The results of this are benign, as the extra code which is run is
unlikely to do anything.
Later versions of Ubuntu (e.g. 24.10 and later) do not install
the systemd-dev package by default. This breaks the systemd-detection
mechanism.
Add this package in for non-systemd-based Debian distributions. Also
log what we are doing for systemd as part of the configure.