From b312056622a1973328ed43864b3ce9419a068c70 Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Thu, 24 Mar 2011 13:33:03 +0100 Subject: [PATCH] Use the same options for proc and sysfs as Gentoo/OpenRC uses --- defaults/initrd.scripts | 2 +- defaults/linuxrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 4a12b73..b228a77 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -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!" } diff --git a/defaults/linuxrc b/defaults/linuxrc index 61efc95..115f1f5 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -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 -- 2.26.2