Skip to content
Snippets Groups Projects
Commit 1369dfca authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

fs_mgr: add /mnt/scratch to possible overlayfs support directories

A default set of options are available, but can override in a fstab
overlay entry with upperdir=, lowerdir= to the same mount point,
workdir=.  The default is a valid /mnt/scratch/overlay/
or /cache/overlay/ directory, with .../<mount_point>/upper and
.../<mount_point>/work, associated with each system partition
<mount_point>.

Test: manual
Bug: 109821005
Change-Id: I5662c01fad17d105665be065f6dcd7c3fdc40d95
parent 0ab9b613
No related branches found
No related tags found
No related merge requests found
...@@ -535,6 +535,7 @@ ...@@ -535,6 +535,7 @@
# Overlayfs support directories # Overlayfs support directories
# #
/cache/overlay(/.*)? u:object_r:overlayfs_file:s0 /cache/overlay(/.*)? u:object_r:overlayfs_file:s0
/mnt/scratch(/.*)? u:object_r:overlayfs_file:s0
/data/cache(/.*)? u:object_r:cache_file:s0 /data/cache(/.*)? u:object_r:cache_file:s0
/data/cache/recovery(/.*)? u:object_r:cache_recovery_file:s0 /data/cache/recovery(/.*)? u:object_r:cache_recovery_file:s0
......
...@@ -4,3 +4,6 @@ ...@@ -4,3 +4,6 @@
/cache/overlay/(system|product)/upper u:object_r:system_file:s0 /cache/overlay/(system|product)/upper u:object_r:system_file:s0
/cache/overlay/(vendor|odm)/upper u:object_r:vendor_file:s0 /cache/overlay/(vendor|odm)/upper u:object_r:vendor_file:s0
/cache/overlay/oem/upper u:object_r:vendor_file:s0 /cache/overlay/oem/upper u:object_r:vendor_file:s0
/mnt/scratch/overlay/(system|product)/upper u:object_r:system_file:s0
/mnt/scratch/overlay/(vendor|odm)/upper u:object_r:vendor_file:s0
/mnt/scratch/overlay/oem/upper u:object_r:vendor_file:s0
...@@ -310,7 +310,7 @@ type system_app_data_file, file_type, data_file_type, core_data_file_type, mlstr ...@@ -310,7 +310,7 @@ type system_app_data_file, file_type, data_file_type, core_data_file_type, mlstr
# Compatibility with type name used in Android 4.3 and 4.4. # Compatibility with type name used in Android 4.3 and 4.4.
# Default type for anything under /cache # Default type for anything under /cache
type cache_file, file_type, data_file_type, core_data_file_type, mlstrustedobject; type cache_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
# Type for /cache/overlay # Type for /cache/overlay /mnt/scratch/overlay
type overlayfs_file, file_type, data_file_type, core_data_file_type; type overlayfs_file, file_type, data_file_type, core_data_file_type;
# Type for /cache/backup_stage/* (fd interchange with apps) # Type for /cache/backup_stage/* (fd interchange with apps)
type cache_backup_file, file_type, data_file_type, core_data_file_type, mlstrustedobject; type cache_backup_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
......
...@@ -297,9 +297,9 @@ allow init self:global_capability2_class_set syslog; ...@@ -297,9 +297,9 @@ allow init self:global_capability2_class_set syslog;
# init access to /proc. # init access to /proc.
r_dir_file(init, proc_net_type) r_dir_file(init, proc_net_type)
# Overlayfs workdir write access check during mount to permit remount,rw
userdebug_or_eng(` userdebug_or_eng(`
allow init overlayfs_file:dir { relabelfrom write }; # Overlayfs workdir write access check during mount to permit remount,rw
allow init overlayfs_file:dir { relabelfrom mounton write };
') ')
allow init { allow init {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment