Revert "Stop granting init access to block device properties"
This reverts commit f20fea50f12100896915184b22bb93033da8564f.
Reason for revert: unbreak the git_sc-v2-dev-plus-aosp tests
Bug: 202879263
Change-Id: I79245afb4ba7f5be8ee46f2e91921a7327b650c5
diff --git a/private/init.te b/private/init.te
index 4312444..200780d 100644
--- a/private/init.te
+++ b/private/init.te
@@ -42,6 +42,12 @@
allow init sysfs_loop:dir r_dir_perms;
allow init sysfs_loop:file rw_file_perms;
+# Allow init to examine the properties of block devices.
+allow init sysfs_block_type:file { getattr read };
+# Allow init access /dev/block
+allow init bdev_type:dir r_dir_perms;
+allow init bdev_type:blk_file getattr;
+
# Allow init to write to the drop_caches file.
allow init proc_drop_caches:file rw_file_perms;