Use python libselinux bindings to determine policy version.
This eliminates the hardcoded /selinux in Rules.monolithic, which broke when the filesystem mount was moved to /sys/fs/selinux.
This commit is contained in:
parent
7e95a88171
commit
3bf7fd504c
1
Makefile
1
Makefile
@ -97,6 +97,7 @@ support := support
|
||||
genxml := $(PYTHON) -E $(support)/segenxml.py
|
||||
gendoc := $(PYTHON) -E $(support)/sedoctool.py
|
||||
genperm := $(PYTHON) -E $(support)/genclassperms.py
|
||||
policyvers := $(PYTHON) -E $(support)/policyvers.py
|
||||
fcsort := $(tmpdir)/fc_sort
|
||||
setbools := $(AWK) -f $(support)/set_bools_tuns.awk
|
||||
get_type_attr_decl := $(SED) -r -f $(support)/get_type_attr_decl.sed
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
# determine the policy version and current kernel version if possible
|
||||
pv := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
|
||||
kv := $(shell cat /selinux/policyvers)
|
||||
kv := $(shell $(policyvers))
|
||||
|
||||
# dont print version warnings if we are unable to determine
|
||||
# the currently running kernel's policy version
|
||||
|
3
support/policyvers.py
Normal file
3
support/policyvers.py
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/python
|
||||
import selinux
|
||||
print selinux.security_policyvers()
|
Loading…
Reference in New Issue
Block a user