blob: c810efb62781d82d89467e9f41749e50a598144a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Since qarshd.te is generated, set an explicit dep on qarshd.pp
all: qarshd.pp
selinux_devel := /usr/share/selinux/devel
include $(selinux_devel)/Makefile
qarshd.te: qarshd.te.in qarshd.te.trans
cat $^ > $@
# 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"]//interface[param/@name="domain" and count(param) = 1 and contains(@name, "domtrans")]/@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))
qarshd.te.trans: $(selinux_devel)/policy.xml qarshd.bad-interfaces
for d in $(interfaces); do \
echo "$$d(qarshd_t)"; \
done > $@
# Add a cleanup step for our generated files
clean: clean-qarsh
clean-qarsh:
$(RM) qarshd.te qarshd.te.trans
|