接前一篇文章:SELinux refpolicy详解(12)
三、refpolicy内容详解
上一回讲解了refpolicy源码根目录下的Rules.monolithic文件的第二部分内容(代码片段3、4、5),本回接着往下进行解析。
4. Rules.monolithic
文件路径:refpolicy源码根目录/Rules.monolithic。
文件内容如下:
########################################
#
# Rules and Targets for building monolithic policies
## determine the policy version and current kernel version if possible
pv := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
kv := $(shell $(policyvers))# dont print version warnings if we are unable to determine
# the currently running kernel's policy version
ifeq "$(kv)" ""kv := $(pv)
endif# dont print version warnings if we specified a lower version than the kernel supports
ifneq "$(OUTPUT_POLICY)&#