]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Mount /dev, /dev/shm and /run noexec
authorNikoli <nikoli@gmx.us>
Sat, 15 Nov 2014 14:01:18 +0000 (17:01 +0300)
committerHarald Hoyer <harald@redhat.com>
Tue, 2 Jun 2015 09:46:59 +0000 (11:46 +0200)
modules.d/99base/init.sh

index f4291c4e0ac3c8ae93437c38a1b2fb9d1f5e0815..f96dbb5061f1244663c8133704164a6ca886a432 100755 (executable)
@@ -38,7 +38,7 @@ RD_DEBUG=""
 setdebug
 
 if ! ismounted /dev; then
-    mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null
+    mount -t devtmpfs -o mode=0755,noexec,nosuid,strictatime devtmpfs /dev >/dev/null
 fi
 
 if ! ismounted /dev; then
@@ -59,12 +59,12 @@ fi
 
 if ! ismounted /dev/shm; then
     mkdir -m 0755 /dev/shm
-    mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
+    mount -t tmpfs -o mode=1777,noexec,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
 fi
 
 if ! ismounted /run; then
     mkdir -m 0755 /newrun
-    mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
+    mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
     cp -a /run/* /newrun >/dev/null 2>&1
     mount --move /newrun /run
     rm -fr -- /newrun