diff options
Diffstat (limited to 'SELinux/Makefile')
-rw-r--r-- | SELinux/Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/SELinux/Makefile b/SELinux/Makefile index 8b978d7..1a0c6ee 100644 --- a/SELinux/Makefile +++ b/SELinux/Makefile @@ -10,17 +10,24 @@ qarshd.te: qarshd.te.in qarshd.te.trans # Pull all interfaces listed in policy.xml from the services or apps layer # which have one parameter named domains and whose name contains domtrans -allinterfaces := $(shell gxpp '//layer[@name = "services" or @name = "apps" or @name = "system"]//interface[param/@name="domain" and count(param) = 1 and contains(@name, "domtrans")]/@name' $(selinux_devel)/policy.xml) +interfacecond := param/@name="domain" and count(param)=1 and contains(@name, "domtrans") and not(contains(@name, "_spec")) +allinterfaces := $(shell gxpp '//layer[@name = "services" or @name = "apps"]//interface[$(interfacecond)]/@name' $(selinux_devel)/policy.xml) +allinterfaces += $(shell gxpp '//layer[@name = "system"]//module[@name="lvm" or @name="logging"]/interface[$(interfacecond)]/@name' $(selinux_devel)/policy.xml) badinterfaces := $(shell cat qarshd.bad-interfaces) # Filter out interfaces which break policy building or loading. -interfaces = $(filter-out $(badinterfaces), $(allinterfaces)) +interfaces := $(filter-out $(badinterfaces), $(allinterfaces)) -qarshd.te.trans: $(selinux_devel)/policy.xml qarshd.bad-interfaces - for d in $(interfaces); do \ +qarshd.te.trans: $(selinux_devel)/policy.xml qarshd.bad-interfaces Makefile + @for d in $(interfaces); do \ echo "$$d(qarshd_t)"; \ done > $@ +# Helpful target to see what is not needed in bad-interfaces +notbad := $(filter-out $(filter $(badinterfaces), $(allinterfaces)), $(badinterfaces)) +qarshd.notbad: + @echo $(notbad) | sort + # Add a cleanup step for our generated files clean: clean-qarsh |