aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-05-28 14:27:55 +0200
committerJason Zaman <perfinion@gentoo.org>2020-08-09 19:58:45 -0700
commitb4565415b48fb2acba07bb327bca1e7eb334ee7d (patch)
tree1f314208d169e0fd5ec73e5075fcd6246896f741 /Makefile
parentopenvpn: Module version bump. (diff)
downloadhardened-refpolicy-b4565415b48fb2acba07bb327bca1e7eb334ee7d.tar.gz
hardened-refpolicy-b4565415b48fb2acba07bb327bca1e7eb334ee7d.tar.bz2
hardened-refpolicy-b4565415b48fb2acba07bb327bca1e7eb334ee7d.zip
Makefile: add target build-interface-db
Build the policy interface database with 'sepolgen-ifgen'. This database is required for reference style policy generation by 'audit2allow --reference' Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 95fee897..f53f1278 100644
--- a/Makefile
+++ b/Makefile
@@ -62,6 +62,7 @@ SEMOD_PKG ?= $(tc_usrbindir)/semodule_package
SEMOD_LNK ?= $(tc_usrbindir)/semodule_link
SEMOD_EXP ?= $(tc_usrbindir)/semodule_expand
LOADPOLICY ?= $(tc_usrsbindir)/load_policy
+SEPOLGEN_IFGEN ?= $(tc_usrbindir)/sepolgen-ifgen
SETFILES ?= $(tc_sbindir)/setfiles
XMLLINT ?= $(BINDIR)/xmllint
SECHECK ?= $(BINDIR)/sechecker
@@ -230,6 +231,8 @@ MCS_CATS ?= 1024
ifeq ($(QUIET),y)
verbose = @
+else
+ VERBOSE_FLAG = --verbose
endif
M4PARAM += -D mls_num_sens=$(MLS_SENS) -D mls_num_cats=$(MLS_CATS) -D mcs_num_cats=$(MCS_CATS) -D hide_broken_symptoms
@@ -558,6 +561,14 @@ endif
########################################
#
+# Build policy interface database
+#
+build-interface-db: install-headers
+ @mkdir -p $(DESTDIR)/var/lib/sepolgen $(tmpdir)
+ $(verbose) $(SEPOLGEN_IFGEN) $(VERBOSE_FLAG) --interfaces $(headerdir) --output $(DESTDIR)/var/lib/sepolgen/interface_info
+
+########################################
+#
# Install policy documentation
#
install-docs: $(tmpdir)/html $(docfiles)
@@ -659,4 +670,4 @@ ifneq ($(generated_fc),)
endif
endif
-.PHONY: install-src install-appconfig install-headers generate xml conf html bare tags
+.PHONY: install-src install-appconfig install-headers build-interface-db generate xml conf html bare tags