為什麼在寬容模式下會出現 SELinux 錯誤?

為什麼在寬容模式下會出現 SELinux 錯誤?

我已經將 CentOS 8 Stream 設定為 SELinux,permissive但日誌中仍然有一堆紅線,例如:

SELinux is preventing /usr/lib/systemd/systemd from name_connect access on the tcp_socket port 80

這些是真實的還是只是印刷的——如果處於restrictive模式下會發生什麼?

答案1

根據文件:

當 SELinux 在寬容模式下運作時,不強制執行 SELinux 策略。系統保持運作狀態,SELinux 不會拒絕任何操作,而只會記錄 AVC 訊息,然後可用於故障排除、偵錯和 SELinux 策略改進。

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/changing-selinux-states-and-modes_using-selinux

另請參閱/etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=permissive

相關內容