package/iputils: add SELinux module
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 28 Dec 2020 16:11:29 +0000 (17:11 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 29 Dec 2020 13:07:35 +0000 (14:07 +0100)
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.

Note: listing the same SELinux module multiple times is OK, as the list
of modules is eventually $(sort)ed anyway.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
[yann.morin.1998@free.fr: simplifications to only use positive logic]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/iputils/iputils.mk

index 4f8d9cb7684036b42914f2d8dca0ea5c7cedc943..92974592a6f3dea4e2b58ebf728edbd266ca052d 100644 (file)
@@ -27,6 +27,15 @@ 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
+IPUTILS_SELINUX_MODULES = \
+       $(if $(BR2_PACKAGE_IPUTILS_ARPING),netutils) \
+       $(if $(BR2_PACKAGE_IPUTILS_PING),netutils) \
+       $(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),netutils) \
+       $(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),netutils) \
+       $(if $(BR2_PACKAGE_IPUTILS_RDISC),rdisc) \
+       $(if $(BR2_PACKAGE_IPUTILS_TFTPD),tftp)
+
 #
 # arping
 #