public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Mount /dev, /dev/shm and /run noexec
@ 2015-03-25  7:19 Amadeusz Żołnowski
  0 siblings, 0 replies; only message in thread
From: Amadeusz Żołnowski @ 2015-03-25  7:19 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Nikoli

From: Nikoli <nikoli-0UDz38MK/Mo@public.gmane.org>

---
 modules.d/99base/init.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
index 918dea5..d1bdbb6 100755
--- a/modules.d/99base/init.sh
+++ b/modules.d/99base/init.sh
@@ -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
-- 
2.3.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-25  7:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25  7:19 [PATCH 2/2] Mount /dev, /dev/shm and /run noexec Amadeusz Żołnowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox