开发者社区> 问答> 正文

centos 7关于/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=enforcing
# 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

我的问题是第7行也就是"# SELINUXTYPE= can take one of these two values:"这行中说的是two values,但下面的格式却是3个值.不过再仔细一看"# targeted - Targeted processes are protected,"这行最后的标点却是,,说明确实是2个值,我对这里的矛盾很不理解,请问怎么看这个文件?

展开
收起
a123456678 2016-06-21 11:19:54 5520 0
2 条回答
写回答
取消 提交回答
  • 旺旺:nectar2。

    您可以,

    可以按字面析理解,targeted 和 minimum 是都属一个大类的安全策略。请参考:http://selinuxproject.org/page/NB_PolicyType

    2019-07-17 19:44:40
    赞同 展开评论 打赏
  • 根据上面的意思 minimun是targeted的修正版,两个是一类的,而mls是一个更高级的参数,如同strict一样。

    SELINUXTYPE=targeted or minimum
    SELINUXTYPE=mls
    我的centos6.5
    SELINUXTYPE=targeted
    SELINUXTYPE=strict

    2019-07-17 19:44:40
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
《Nginx 代理系统常用手册》 立即下载