selinux 已禁用,但仍在执行?

wor*_*anb 3 fedora selinux

我有一些系统,出于各种原因,我们想要完全禁用 selinux。迄今为止,这已经很成功了,总是在 kickstarts 中使用 selinux=0 并确保 /etc/sysconfig/selinux 包含:

SELINUX=disabled
Run Code Online (Sandbox Code Playgroud)

但截至今天,我有一个正确设置的 Fedora 17 工作站,但在多次重新启动后,它总是以强制模式出现:

# cat /etc/sysconfig/selinux
# 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=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

# getenforce
Enforcing
Run Code Online (Sandbox Code Playgroud)

什么可能导致 selinux 忽略 sysconfig 条目,或者不顾它而启动?

[编辑 1]

我在这里看到了一个相关的问题并尝试了这个:

# selinuxenabled ; echo $?
0
# getenforce
Enforcing
Run Code Online (Sandbox Code Playgroud)

Zab*_*man 9

实际的配置文件是/etc/sellinux/config/etc/sysconfig/selinux链接到该文件。看来您可能丢失了链接并最终得到了一个普通文件。

验证:

# ls -l /etc/sysconfig/selinux
lrwxrwxrwx. 1 root root 17 Dec 22 18:59 /etc/sysconfig/selinux -> ../selinux/config
Run Code Online (Sandbox Code Playgroud)

或者检查/etc/selinux/config 的内容