systemd: add SMACK support option.
authorEric Le Bihan <eric.le.bihan.dev@free.fr>
Sun, 20 Apr 2014 18:54:04 +0000 (20:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 8 Jun 2014 14:31:15 +0000 (16:31 +0200)
A new configuration option is available in systemd menu, to enable
support for SMACK.

For this feature to properly work, systemd requires attr (build
dependency, also used for other features) and smack (runtime dependency).

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/systemd/Config.in
package/systemd/systemd.mk

index ce144155e29f8514c6b128a1c673194239525bec..58f76a5dbf60aa5121720b9ac95ec70bd86e2d34 100644 (file)
@@ -118,4 +118,18 @@ config BR2_PACKAGE_SYSTEMD_COMPAT
 
          This option enables the installation of compatibility *.pc files.
 
+config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
+       bool "enable SMACK support"
+       select BR2_PACKAGE_ATTR
+       select BR2_PACKAGE_SMACK
+       help
+         Enable support for SMACK, the Simple Mandatory Access Control
+         Kernel, a minimal approach to Access Control implemented as a kernel
+         LSM.
+
+         This feature requires a kernel >= 3.8.
+
+         When this feature is enabled, Systemd mounts smackfs and manages
+         security labels for sockets.
+
 endif
index ca51ddfd95e63b30ad1771ec8d760045aad03b8a..6de78872dd92ca2c20e6cf2cddf6c1d3ccad08ec 100644 (file)
@@ -63,6 +63,13 @@ else
 SYSTEMD_CONF_OPT += --disable-acl
 endif
 
+ifeq ($(BR2_PACKAGE_ATTR),y)
+SYSTEMD_CONF_OPT += --enable-attr
+SYSTEMD_DEPENDENCIES += attr
+else
+SYSTEMD_CONF_OPT += --disable-attr
+endif
+
 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
 SYSTEMD_CONF_OPT += --enable-gudev
 SYSTEMD_DEPENDENCIES += libglib2
@@ -105,6 +112,12 @@ else
 SYSTEMD_CONF_OPT += --disable-timesyncd
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
+SYSTEMD_CONF_OPT += --enable-smack
+else
+SYSTEMD_CONF_OPT += --disable-smack
+endif
+
 # mq_getattr needs -lrt
 SYSTEMD_MAKE_OPT += LIBS=-lrt
 SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl