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

Commit 6f7e3952 authored by Ellen Arteca's avatar Ellen Arteca Committed by Gerrit Code Review
Browse files

Merge "Create and support isolation for /data/storage_area" into main

parents 03700c30 f885d551
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -961,6 +961,10 @@ on post-fs-data
    mkdir /data/vendor_ce 0551 root root encryption=None
    mkdir /data/vendor_de 0551 root root encryption=None

    # Similar to the top-level CE and DE directories, /data/storage_area must
    # itself be unencrypted, since it contains encrypted directories.
    mkdir /data/storage_area 0551 root root encryption=None

    # Set the casefold flag on /data/media.  For upgrades, a restorecon can be
    # needed first to relabel the directory from media_rw_data_file.
    restorecon /data/media
@@ -974,8 +978,12 @@ on post-fs-data
    mkdir /data_mirror/data_de 0700 root root
    mkdir /data_mirror/misc_ce 0700 root root
    mkdir /data_mirror/misc_de 0700 root root
    mkdir /data_mirror/storage_area 0700 root root

    # Create CE and DE data directory for default volume
    # Not needed for storage_area directory, since this is
    # not supported for non-default volumes and the path
    # does not include the volume ID
    mkdir /data_mirror/data_ce/null 0700 root root
    mkdir /data_mirror/data_de/null 0700 root root
    mkdir /data_mirror/misc_ce/null 0700 root root
@@ -990,6 +998,9 @@ on post-fs-data
    mount none /data/misc_ce /data_mirror/misc_ce/null bind rec
    mount none /data/misc_de /data_mirror/misc_de/null bind rec

    # Also bind mount for the storage area directory (minus the volume ID)
    mount none /data/storage_area /data_mirror/storage_area bind rec

    # Create mirror directory for jit profiles
    mkdir /data_mirror/cur_profiles 0700 root root
    mount none /data/misc/profiles/cur /data_mirror/cur_profiles bind rec
@@ -1330,6 +1341,8 @@ on userspace-reboot-fs-remount
  umount /data_mirror/data_ce/null/0
  umount /data_mirror/data_ce/null
  umount /data_mirror/data_de/null
  umount /data_mirror/storage_area/0
  umount /data_mirror/storage_area
  umount /data_mirror/cur_profiles
  umount /data_mirror/ref_profiles
  umount /data_mirror