summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Hector Chavez2018-07-11 10:13:34 -0500
committerLuis Hector Chavez2018-07-11 10:36:00 -0500
commitd07d0942c60b7145f11254899b9509d9b327c7ab (patch)
tree033e7df9d8aa57c97cb7d35f379c04de7ec40738 /rootdir
parentbcfc8a2ab035ab085f91b59f7f6f75ee364b3363 (diff)
downloadplatform-system-core-d07d0942c60b7145f11254899b9509d9b327c7ab.tar.gz
platform-system-core-d07d0942c60b7145f11254899b9509d9b327c7ab.tar.xz
platform-system-core-d07d0942c60b7145f11254899b9509d9b327c7ab.zip
init.rc: Remount / with MS_REMOUNT|MS_BIND|MS_NODEV
/ should not have any character/block devices, so might as well pass in the nodev flag. Bug: 73255020 Test: aosp_sailfish still boots Test: sailfish:/ # find / -xdev -a \( -type b -o -type c -o -type p -o -type s \) sailfish:/ # Test: rootfs on / type rootfs (rw,seclabel) /dev/root on / type ext4 (ro,seclabel,nodevrelatime) Change-Id: Ia73e04b53a47506892d9d3cb61b471b81bb72dc3
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index c1ae93283..d3f038ea5 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -318,8 +318,8 @@ on post-fs
318 start vndservicemanager 318 start vndservicemanager
319 319
320 # Once everything is setup, no need to modify /. 320 # Once everything is setup, no need to modify /.
321 # The bind+ro combination avoids modifying any other mount flags. 321 # The bind+remount combination allows this to work in containers.
322 mount rootfs rootfs / remount bind ro 322 mount rootfs rootfs / remount bind ro nodev
323 # Mount shared so changes propagate into child namespaces 323 # Mount shared so changes propagate into child namespaces
324 mount rootfs rootfs / shared rec 324 mount rootfs rootfs / shared rec
325 # Mount default storage into root namespace 325 # Mount default storage into root namespace