Mount the securityfs filesystem and make available its location through the
exported variable SECURITYFSDIR.

Signed-off-by: Roberto Sassu <[email protected]>
Acked-by: Gianluca Ramunno <[email protected]>
---
 modules.d/99base/init |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules.d/99base/init b/modules.d/99base/init
index 5975b25..e2bbf3d 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -84,6 +84,12 @@ RD_DEBUG=""
 [ ! -d /sys/kernel ] && \
     mount -t sysfs -o nosuid,noexec,nodev sysfs /sys >/dev/null 2>&1
 
+SECURITYFSDIR="/sys/kernel/security"
+export SECURITYFSDIR
+if ! ismounted "${SECURITYFSDIR}"; then
+    mount -t securityfs -o nosuid,noexec,nodev ${SECURITYFSDIR} 
${SECURITYFSDIR} >/dev/null 2>&1
+fi
+
 if [ -x /lib/systemd/systemd-timestamp ]; then
     RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp)
 else
-- 
1.7.4.4

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to