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
This commit is contained in:
Luis Hector Chavez 2018-07-11 08:13:34 -07:00
parent bcfc8a2ab0
commit d07d0942c6
1 changed files with 2 additions and 2 deletions

View File

@ -318,8 +318,8 @@ on post-fs
start vndservicemanager
# Once everything is setup, no need to modify /.
# The bind+ro combination avoids modifying any other mount flags.
mount rootfs rootfs / remount bind ro
# The bind+remount combination allows this to work in containers.
mount rootfs rootfs / remount bind ro nodev
# Mount shared so changes propagate into child namespaces
mount rootfs rootfs / shared rec
# Mount default storage into root namespace