[Buildroot] [PATCH v2 09/14] package/iputils: add SELinux module
Maxime Chevallier
maxime.chevallier at bootlin.com
Mon Dec 28 16:11:29 UTC 2020
Support for the iputils is added by the admin/netutils module in the
SELinux refpolicy for the following tools :
- arping
- ping
- tracepath
- traceroute6
Support for rdisc is added by services/rdisc.
Support for tftpd is added by services/tftp.
Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
---
V1 -> V2: Use a per-tool module selection, for rdisc and tftpd,
according to Antoine's review
package/iputils/iputils.mk | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk
index 4f8d9cb768..b1d71b38f2 100644
--- a/package/iputils/iputils.mk
+++ b/package/iputils/iputils.mk
@@ -27,6 +27,22 @@ IPUTILS_CONF_OPTS += \
-DBUILD_TRACEROUTE6=$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),true,false) \
-DBUILD_NINFOD=$(if $(BR2_PACKAGE_IPUTILS_NINFOD),true,false)
+# Selectively select the appropriate SELinux refpolicy modules
+ifneq ($(BR2_PACKAGE_IPUTILS_ARPING)\
+ $(BR2_PACKAGE_IPUTILS_PING)\
+ $(BR2_PACKAGE_IPUTILS_TRACEPATH)\
+ $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),)
+IPUTILS_SELINUX_MODULES += netutils
+endif
+
+ifeq ($(BR2_PACKAGE_IPUTILS_RDISC),y)
+IPUTILS_SELINUX_MODULES += rdisc
+endif
+
+ifeq ($(BR2_PACKAGE_IPUTILS_TFTPD),y)
+IPUTILS_SELINUX_MODULES += tftp
+endif
+
#
# arping
#
--
2.25.4
More information about the buildroot
mailing list