TMAegisBeta
更多 linux 规则

Linux distributions

TMA-ROCKY9-1.8.7

Ensure Wayland is configured

中级别 1自动化linux

说明

The GNOME Display Manager (GDM) uses the Wayland display server by default. The WaylandEnable setting in the [daemon] block of /etc/gdm/custom.conf (or /etc/gdm3/custom.conf) controls this behavior; when it is set to false, GDM and user login sessions fall back to the legacy Xorg (X11) display server.

检查方式

审计方法: Shell 命令

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Psi -- '"'"'^\h*WaylandEnable\h*=\h*false\b'"'"' /etc/gdm/custom.conf /etc/gdm3/custom.conf' 2>/dev/null); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi
预期输出
compliant

修复方式

修复方法: 操作指南或基础设施补丁

If Wayland has been disabled, edit the GDM configuration file (/etc/gdm/custom.conf or /etc/gdm3/custom.conf) and remove or comment out the WaylandEnable=false line in the [daemon] block so that GDM uses the default Wayland display server. For example: # sed -ri '/^\s*\[daemon\]/,/^\s*\[/ s/^(\s*WaylandEnable\s*=\s*false)/# \1/I' /etc/gdm/custom.conf Reboot the system, or restart GDM, for the change to take effect.

属性

操作系统
rocky-9
标签
cis-convertedlinux
参考
CIS Rocky Linux 9 Benchmark v3.0.0 - 1.8.7

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target linux