Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d07d0942 authored by Luis Hector Chavez's avatar Luis Hector Chavez
Browse files

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
parent bcfc8a2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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