summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-08-06 19:35:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-06 19:35:56 +0000
commit779a38a5cd8dab1741ae4a45907bfdf0449bd546 (patch)
treedd8838bbe037cddb468bce967876e48dd65b08a5 /rootdir
parentd3a5e857e4f6cb13d1c1f067c6faa0f5ba957318 (diff)
parentb9f438ff841f87c8ffbca85b13a533718a18e15f (diff)
downloadsystem_core-779a38a5cd8dab1741ae4a45907bfdf0449bd546.zip
system_core-779a38a5cd8dab1741ae4a45907bfdf0449bd546.tar.gz
system_core-779a38a5cd8dab1741ae4a45907bfdf0449bd546.tar.bz2
am b9f438ff: Protect runtime storage mount points.
* commit 'b9f438ff841f87c8ffbca85b13a533718a18e15f': Protect runtime storage mount points.
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc17
1 files changed, 9 insertions, 8 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index a4e31a9..de143b7 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -69,16 +69,17 @@ on init
# Storage views to support runtime permissions
mkdir /storage 0755 root root
- mkdir /mnt/runtime_default 0755 root root
- mkdir /mnt/runtime_default/self 0755 root root
- mkdir /mnt/runtime_read 0755 root root
- mkdir /mnt/runtime_read/self 0755 root root
- mkdir /mnt/runtime_write 0755 root root
- mkdir /mnt/runtime_write/self 0755 root root
+ mkdir /mnt/runtime 0700 root root
+ mkdir /mnt/runtime/default 0755 root root
+ mkdir /mnt/runtime/default/self 0755 root root
+ mkdir /mnt/runtime/read 0755 root root
+ mkdir /mnt/runtime/read/self 0755 root root
+ mkdir /mnt/runtime/write 0755 root root
+ mkdir /mnt/runtime/write/self 0755 root root
# Symlink to keep legacy apps working in multi-user world
symlink /storage/self/primary /sdcard
- symlink /mnt/user/0/primary /mnt/runtime_default/self/primary
+ symlink /mnt/user/0/primary /mnt/runtime/default/self/primary
# memory control cgroup
mkdir /dev/memcg 0700 root system
@@ -230,7 +231,7 @@ on post-fs
# Mount shared so changes propagate into child namespaces
mount rootfs rootfs / shared rec
# Mount default storage into root namespace
- mount none /mnt/runtime_default /storage slave bind rec
+ mount none /mnt/runtime/default /storage slave bind rec
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache