The loadable sesman authentication modules use different types for the
authentication handle returned from auth_userpass(). The PAM module
uses a pointer, and the other modules use (effectively) a boolean. Within
sesman itself, a long or tbus (intptr_t) is used.
This PR replaces all of these types with a pointer to an incomplete type.
Consequently:-
- A single better-labelled type is used it all places within sesman so
it's more obvious what's being handled.
- There is no need to cast the authentication handle within the PAM
module to a long and back again.
- The compiler can check function signatures between auth.h and the
various verify modules.
This commit adds the variables fv1_select and default_dpi to
xrdp.ini. These variables allow for a different font to be
loaded, depending on the DPI of the login screen.
The dimensions from xrdp.ini are replaced with scaled and unscaled
versions. The unscaled versions are read from the config file, and
then scaled to match the loaded font.
Currently this has no significant effect, as the same font is still
loaded, so the scaling factor is 1.00. However, when a different font
is loaded, the login window can be made larger for use on higher DPI
monitors.
The previous commit added utilities which work with fv1 files
with additional fields in the fv1 header (i.e. body_height and
min_descender). This commit makes minor changes to the font loading code
in xrdp so xrdp can read the new font format.
To generate new fonts, the freetype2 library is required. This
can now be specified by configure in the usual way. If it's missing,
new fonts cannot be generated.
The font body height is now explicitly stored in the font
structure. This is the definition that would be used for manual
typesetting (i.e. the line spacing). This is used for calculating
the heights of strings.
The window title header has also been increased by 3 pixels from a
hard-coded 18 to (font_height + 5), which now equates to 21 pixels
with the sans-10.fv1 font.
This may throw a warning with clang-15+ when devel logs are disabled
Fixes
../../../xrdp-0.9.19/sesman/chansrv/chansrv.c:198:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
To implement a scalable login screen, we need to be able to ascertain
the DPI of the connected primary monitor.
At present, in a multi-monitor situation, this information is available in
the struct display_size_description, which can be searched for the primary
monitor. This is only the case however if the Display Control Channel
Extension is in use ([MS-RDPEDISP]), and a DISPLAYCONTROL_MONITOR_LAYOUT
has been received.
This PR retrieves physical monitor size information from the following
two additional places.
1) The TS_UD_CS_CORE PDU. Physical size information is optionally
included in this PDU for single-screen configurations.
2) The TS_UD_CS_MONITOR_EX PDU. This includes physical size
information for multiple-screen configurations.
- Fixes MSTSC resizing (with RFX as well).
- Queue system so that resizes are processed when XRDP and the X server
are ready, not immediately.
- Deletes and recreates the encoder (RFX fix)
- Introduces a dynamic_monitor_description struct that is used for the
queue system.
- Fix some lines previously introduced by the original resizing code to
be 80 chars long, as is the standard for XRDP.