At this point, allowing X Font Server connections just introduces us to
possible security issues since the code effectively trusts any font
server and few checks are in place.
Since font servers also haven't been used for ages, let's disable
them by default. Use-cases that require them will have to pass
+fontserverconnections on the commandline and/or set the corresponding
ServerFlags option.
The tests are a bit hacky: Debian builds libXfont2 with --disable-fc so
we need to cater for the case where the X server enables fontserver support
but libXfont then blocks it and we still need to treat this as success.
Assisted-by: Claude:claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2263>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The xf86Info.consType field and the BSD console-driver-type constants
(PCCONS/SYSCONS/PCVT/WSCONS/...) are the BSD console machinery consumed
by hw/xfree86/os-support/bsd/console_*.c and bsd_VTsw.c. They were
gated on the opaque grab-bag macro CSRG_BASED ("Computer Systems
Research Group", i.e. BSD-derived) OR'd with __FreeBSD_kernel__.
Introduce a self-documenting meson flag CONFIG_BSD_CONSOLE (following
the existing CONFIG_WSCONS/CONFIG_UDEV/... convention) set to exactly
`csrg_based or host_machine.system() == 'kfreebsd'` — i.e. the same set
of platforms the old `CSRG_BASED || __FreeBSD_kernel__` guard matched —
and use it at all three sites (struct field, constants, initializer).
Behaviour / ABI:
- The flag is true on precisely the same platforms as before, so the
xf86InfoRec layout is unchanged everywhere. On Linux (and every
non-BSD target) CONFIG_BSD_CONSOLE is undefined just as CSRG_BASED
was, so consType stays absent and the struct offsets — hence the
driver ABI, incl. the nvidia blob — are untouched.
- Fixes a latent inconsistency on GNU/kFreeBSD: the struct field was
present there (via __FreeBSD_kernel__) but xf86Globals.c initialised
.consType only under #ifdef CSRG_BASED, so it defaulted to 0 instead
of -1. Both are now driven by the single CONFIG_BSD_CONSOLE flag, so
field presence and initialiser always agree.
Verified: Linux -Dwerror=true build configures (dix-config.h gets
`#undef CONFIG_BSD_CONSOLE`) and links Xorg cleanly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>