网站开发源代码什么意思,wordpress 链接美化,百度一下就知道百度首页,湖南网站推广多少钱接前一篇文章#xff1a;SELinux refpolicy详解#xff08;8#xff09; 三、refpolicy内容详解
上一回讲解了refpolicy源码根目录下的build.conf文件的前一部分内容。本回继续讲解其后一部分。
2. build.conf
文件路径#xff1a;refpolicy源码根目录/build.conf。
文…接前一篇文章SELinux refpolicy详解8 三、refpolicy内容详解
上一回讲解了refpolicy源码根目录下的build.conf文件的前一部分内容。本回继续讲解其后一部分。
2. build.conf
文件路径refpolicy源码根目录/build.conf。
文件内容如下
########################################
#
# Policy build options
## Policy version
# By default, checkpolicy will create the highest
# version policy it supports. Setting this will
# override the version. This only has an
# effect for monolithic policies.
#OUTPUT_POLICY 33# Policy Type
# standard, mls, mcs
TYPE standard# Policy Name
# If set, this will be used as the policy
# name. Otherwise the policy type will be
# used for the name.
NAME refpolicy# Distribution
# Some distributions have portions of policy
# for programs or configurations specific to the
# distribution. Setting this will enable options
# for the distribution.
# redhat, gentoo, debian, suse, and rhel4 are current options.
# Fedora users should enable redhat.
#DISTRO redhat# Unknown Permissions Handling
# The behavior for handling permissions defined in the
# kernel but missing from the policy. The permissions
# can either be allowed, denied, or the policy loading
# can be rejected.
# allow, deny, and reject are current options.
UNK_PERMS deny# Direct admin init
# Setting this will allow sysadm to directly
# run init scripts, instead of requiring run_init.
# This is a build option, as role transitions do
# not work in conditional policy.
DIRECT_INITRC n# Systemd
# Setting this will configure systemd as the init system.
SYSTEMD n# Build monolithic policy. Putting y here
# will build a monolithic policy.
MONOLITHIC n# User-based access control (UBAC)
# Enable UBAC for role separations.
UBAC y# Custom build options. This field enables custom
# build options. Putting foo here will enable
# build option blocks named foo. Options should be
# separated by spaces.
CUSTOM_BUILDOPT # Number of MLS Sensitivities
# The sensitivities will be s0 to s(MLS_SENS-1).
# Dominance will be in increasing numerical order
# with s0 being lowest.
MLS_SENS 16# Number of MLS Categories
# The categories will be c0 to c(MLS_CATS-1).
MLS_CATS 1024# Number of MCS Categories
# The categories will be c0 to c(MLS_CATS-1).
MCS_CATS 1024# Set this to y to only display status messages
# during build.
QUIET n# Set this to treat warnings as errors.
WERROR n
策略构建选项
DIRECT_INITRC
直接管理初始化。
设置此选项将允许sysadm直接运行init脚本而不需要run_init。
这是一个构建选项因为角色转换在条件策略中不起作用。
README中的讲解 布尔类型。 如果设置为ysysadm将被允许直接运行init脚本而不需要run_init工具。 这是一个构建选项而不是可调的因为角色转换在条件策略中不起作用。 此选项控制direct_sysadm_demon策略块。 注此项在build.conf中默认设置为n。 对应代码片段
# Direct admin init
# Setting this will allow sysadm to directly
# run init scripts, instead of requiring run_init.
# This is a build option, as role transitions do
# not work in conditional policy.
DIRECT_INITRC n
SYSTEMD
Systemd。
设置此项将把systemd配置为init系统。
README中的讲解 布尔类型。 如果设置则systemd将被假定为init进程的提供者。 注此项在build.conf中默认设置为n。 对应代码片段
# Systemd
# Setting this will configure systemd as the init system.
SYSTEMD n
MONOLITHIC
构建单一整体策略。
把y放在这里将建立一个单一整体的策略。
README中的讲解 布尔类型。 如果设置为y则构建一个单一整体策略否则为n构建一个模块化策略。 注此项在build.conf中默认设置为n。 对应代码片段
# Build monolithic policy. Putting y here
# will build a monolithic policy.
MONOLITHIC n
UBAC
基于用户的访问控制UBAC。
为角色分离启用UBAC。
README中的讲解 布尔类型。 如果设置SELinux用户将额外用于近似的角色分离。 注此项在build.conf中默认设置为y。 对应代码片段
# User-based access control (UBAC)
# Enable UBAC for role separations.
UBAC y
CUSTOM_BUILDOPT
自定义生成选项。
此字段启用自定义生成选项。
在此处放置foo将启用名为foo的构建选项块。选项应该用空格分隔。
README中的讲解
无。
对应代码片段
# Custom build options. This field enables custom
# build options. Putting foo here will enable
# build option blocks named foo. Options should be
# separated by spaces.
CUSTOM_BUILDOPT
MLS_SENS
MLS敏感度的数量。
灵敏度为s0到sMLS_SENS-1。
优势将以数字顺序递增s0最低。
README中的讲解 整数类型。 设置MLS策略中的敏感度数量。在standard和MCS策略忽略此项。 注此项在build.conf中默认设置为16。 对应代码片段
# Number of MLS Sensitivities
# The sensitivities will be s0 to s(MLS_SENS-1).
# Dominance will be in increasing numerical order
# with s0 being lowest.
MLS_SENS 16
MLS_CATS
MLS类别的数量。
类别为c0到cMLS_CATS-1。
README中的讲解 整数类型。 设置MLS策略中的类别数。在standard和MCS策略忽略此项。 注此项在build.conf中默认设置为1024。 对应代码片段
# Number of MLS Categories
# The categories will be c0 to c(MLS_CATS-1).
MLS_CATS 1024
MCS_CATS
MCS类别的数量。
类别为c0到cMCS_CATS-1。
README中的讲解 整数类型。 设置MCS策略中的类别数。在standard和MLS策略中忽略此项。 注此项在build.conf中默认设置为1024。 对应代码片段
# Number of MCS Categories
# The categories will be c0 to c(MLS_CATS-1).
MCS_CATS 1024
QUIET
将此值设置为y可在构建期间仅显示状态消息。
README中的讲解 布尔类型。 如果设置则构建系统将仅显示状态消息和错误消息。此选项对策略没有影响。 注此项在build.conf中默认设置为n。 对应代码片段
# Set this to y to only display status messages
# during build.
QUIET n
WERROR
若此项设置则将警告视为错误。
README中的讲解 布尔类型。 如果设置则构建系统将把警告视为错误。如果遇到任何警告则构建将失败。 注此项在build.conf中默认设置为n。 对应代码片段
# Set this to treat warnings as errors.
WERROR n至此build.conf文件就全部讲解完了。