summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2010-06-08 14:40:53 -0700
committerNick Kralevich <nnk@google.com>2010-06-08 14:40:53 -0700
commit4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b (patch)
tree35ade3125ce2c1268727e0dd91c52c368bedb14c /init
parent7b84e72cc4609e04afdd7cc9a337be99444f74a9 (diff)
downloadsystem_core-4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b.zip
system_core-4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b.tar.gz
system_core-4ec97f2b257f5c9ed7cf6f0245212f4e3eb60c1b.tar.bz2
Mount /dev with noexec and nosuid
Change-Id: Iea182c1e6a72c281abd17bf83ff765bb9cb59270
Diffstat (limited to 'init')
-rwxr-xr-xinit/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c
index 8f95da7..726b954 100755
--- a/init/init.c
+++ b/init/init.c
@@ -673,7 +673,7 @@ int main(int argc, char **argv)
mkdir("/proc", 0755);
mkdir("/sys", 0755);
- mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755");
+ mount("tmpfs", "/dev", "tmpfs", MS_NOEXEC | MS_NOSUID, "mode=0755");
mkdir("/dev/pts", 0755);
mkdir("/dev/socket", 0755);
mount("devpts", "/dev/pts", "devpts", 0, NULL);