Blame 0030-base-init-mount-the-securityfs-filesystem.patch

Harald Hoyer 428fde
From a6c418ee432bbc62633a42417d6a0c41160c404a Mon Sep 17 00:00:00 2001
Harald Hoyer 428fde
From: Roberto Sassu <roberto.sassu@polito.it>
Harald Hoyer 428fde
Date: Fri, 8 Jul 2011 14:10:59 +0200
Harald Hoyer 428fde
Subject: [PATCH] base/init: mount the securityfs filesystem
Harald Hoyer 428fde
Harald Hoyer 428fde
Mount the securityfs filesystem and make available its location through the
Harald Hoyer 428fde
exported variable SECURITYFSDIR.
Harald Hoyer 428fde
Harald Hoyer 428fde
Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Harald Hoyer 428fde
Acked-by: Gianluca Ramunno <ramunno@polito.it>
Harald Hoyer 428fde
---
Harald Hoyer 428fde
 modules.d/99base/init |    6 ++++++
Harald Hoyer 428fde
 1 files changed, 6 insertions(+), 0 deletions(-)
Harald Hoyer 428fde
Harald Hoyer 428fde
diff --git a/modules.d/99base/init b/modules.d/99base/init
Harald Hoyer 428fde
index 1fac580..ae834be 100755
Harald Hoyer 428fde
--- a/modules.d/99base/init
Harald Hoyer 428fde
+++ b/modules.d/99base/init
Harald Hoyer 428fde
@@ -84,6 +84,12 @@ RD_DEBUG=""
Harald Hoyer 428fde
 [ ! -d /sys/kernel ] && \
Harald Hoyer 428fde
     mount -t sysfs -o nosuid,noexec,nodev sysfs /sys >/dev/null 2>&1
Harald Hoyer 428fde
 
Harald Hoyer 428fde
+SECURITYFSDIR="/sys/kernel/security"
Harald Hoyer 428fde
+export SECURITYFSDIR
Harald Hoyer 428fde
+if ! ismounted "${SECURITYFSDIR}"; then
Harald Hoyer 428fde
+    mount -t securityfs -o nosuid,noexec,nodev ${SECURITYFSDIR} ${SECURITYFSDIR} >/dev/null 2>&1
Harald Hoyer 428fde
+fi
Harald Hoyer 428fde
+
Harald Hoyer 428fde
 if [ -x /lib/systemd/systemd-timestamp ]; then
Harald Hoyer 428fde
     RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp)
Harald Hoyer 428fde
 else