10.3. SELinux
删除了通过 /etc/selinux/config
禁用 SELinux 的支持
在 RHEL 9.0 发行版本中,支持通过 /etc/selinux/config
文件中的 SELINUX=disabled
选项禁用 SELinux 已从内核中删除。当您只通过 /etc/selinux/config
禁用 SELinux 时,系统会以启用了 SELinux 的方式启动,但没有加载策略,SELinux 安全钩子仍注册在内核中。这意味着,使用 /etc/selinux/config
禁用的 SELinux 仍然需要一些系统资源,您应该在所有性能敏感的情况下使用内核命令行禁用 SELinux。
另外,Anaconda 安装程序和相应的 man page 已被更新以反映这个更改。此更改还为 Linux 安全模块(LSM)hook 启用只读初始保护功能。
如果您需要禁用 SELinux,请在内核命令行中添加 selinux=0
参数。
如需更多信息,请参阅 删除对 SELinux 运行时禁用 Fedora wiki 页面。
SELinux 策略中限制的其他服务
RHEL 9.3 发行版本在限制以下 systemd
服务的 SELinux 策略中添加了额外的规则:
-
qat
-
systemd-pstore
-
boothd
-
fdo-manufacturing-server
-
fdo-rendezvous-server
-
fdo-client-linuxapp
-
fdo-owner-onboarding-server
因此,这些服务不会再使用 unconfined_service_t
SELinux 标签运行,并可在 SELinux enforcing 模式下成功运行。