Use the same options for proc and sysfs as Gentoo/OpenRC uses
authorPeter Hjalmarsson <xake@rymdraket.net>
Thu, 24 Mar 2011 12:33:03 +0000 (13:33 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Mon, 28 Mar 2011 17:26:10 +0000 (19:26 +0200)
defaults/initrd.scripts
defaults/linuxrc

index 4a12b73ed44abd4a5c45e435ea7bb158d1c574ea..b228a77f9074f19b921af63e8ed4595b793a81da 100755 (executable)
@@ -210,7 +210,7 @@ cache_cd_contents() {
 }
 
 mount_sysfs() {
-       mount -t sysfs /sys /sys >/dev/null 2>&1
+       mount -t sysfs sysfs /sys -o noexec,nosuid,nodev >/dev/null 2>&1
        ret=$?
        [ ${ret} -eq 0 ] || bad_msg "Failed to mount /sys!"
 }
index 61efc9537ad250dc4e140a234d9bcc6874a8635c..115f1f52aad2bfb0ac50a2471866cac7121cafbc 100755 (executable)
@@ -20,7 +20,7 @@ then
        exit 1
 fi
 
-mount -t proc proc /proc >/dev/null 2>&1
+mount -t proc -o noexec,nosuid,nodev proc /proc >/dev/null 2>&1
 mount -o remount,rw / >/dev/null 2>&1
 
 # Set up symlinks