Skip to content
Snippets Groups Projects
Commit 210a805b authored by Tri Vo's avatar Tri Vo
Browse files

Sepolicy for rw mount point for vendors.

Bug: 64905218
Test: device boots with /mnt/vendor present and selinux label
mnt_vendor_file applied correctly.
Change-Id: Ib34e2859948019d237cf2fe8f71845ef2533ae27
parent 2ccd99a5
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
lowpan_service lowpan_service
mediaextractor_update_service mediaextractor_update_service
mediaprovider_tmpfs mediaprovider_tmpfs
mnt_vendor_file
netd_stable_secret_prop netd_stable_secret_prop
network_watchlist_data_file network_watchlist_data_file
network_watchlist_service network_watchlist_service
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
lowpan_prop lowpan_prop
lowpan_service lowpan_service
mediaextractor_update_service mediaextractor_update_service
mnt_vendor_file
network_watchlist_data_file network_watchlist_data_file
network_watchlist_service network_watchlist_service
perfetto perfetto
......
...@@ -526,3 +526,7 @@ ...@@ -526,3 +526,7 @@
/mnt/user(/.*)? u:object_r:mnt_user_file:s0 /mnt/user(/.*)? u:object_r:mnt_user_file:s0
/mnt/runtime(/.*)? u:object_r:storage_file:s0 /mnt/runtime(/.*)? u:object_r:storage_file:s0
/storage(/.*)? u:object_r:storage_file:s0 /storage(/.*)? u:object_r:storage_file:s0
#############################
# mount point for read-write vendor partitions
/mnt/vendor(/.*)? u:object_r:mnt_vendor_file:s0
...@@ -1355,3 +1355,9 @@ userdebug_or_eng(` ...@@ -1355,3 +1355,9 @@ userdebug_or_eng(`
dontaudit domain proc_type:file create; dontaudit domain proc_type:file create;
dontaudit domain sysfs_type:file create; dontaudit domain sysfs_type:file create;
') ')
# Platform must not have access to /mnt/vendor.
neverallow {
coredomain
-init
} mnt_vendor_file:dir *;
...@@ -224,6 +224,9 @@ type storage_file, file_type; ...@@ -224,6 +224,9 @@ type storage_file, file_type;
type mnt_media_rw_stub_file, file_type; type mnt_media_rw_stub_file, file_type;
type storage_stub_file, file_type; type storage_stub_file, file_type;
# Mount location for read-write vendor partitions.
type mnt_vendor_file, file_type;
# /postinstall: Mount point used by update_engine to run postinstall. # /postinstall: Mount point used by update_engine to run postinstall.
type postinstall_mnt_dir, file_type; type postinstall_mnt_dir, file_type;
# Files inside the /postinstall mountpoint are all labeled as postinstall_file. # Files inside the /postinstall mountpoint are all labeled as postinstall_file.
......
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