]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/init: mount the securityfs filesystem
authorRoberto Sassu <roberto.sassu@polito.it>
Fri, 8 Jul 2011 12:10:59 +0000 (14:10 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 28 Jul 2011 13:01:34 +0000 (15:01 +0200)
Mount the securityfs filesystem and make available its location through the
exported variable SECURITYFSDIR.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Acked-by: Gianluca Ramunno <ramunno@polito.it>
modules.d/99base/init

index 1fac580e39540bf1240d30a24fcc17821ac04541..ae834bed737ad16dc4238a47859745522730c8a7 100755 (executable)
@@ -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