Add the 'bdev_type' attribute to all block device types

The following patch introduces code that iterates over all block
devices:
https://android-review.googlesource.com/c/platform/system/core/+/1783847/9

The following patch grants 'init' and 'apexd' permission to iterate over
all block devices:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1783947

The above SELinux policy change requires to add the 'bdev_type'
attribute to all block devices. Hence this patch.

Bug: 194450129
Bug: 196982345
Test: Built Android images that include this change and verified that neither init nor apexd triggers any SELinux access denied errors.
Change-Id: I6ce1127f199c5b33812f15fe280d86594d7d7ebf
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche 2021-08-06 15:40:33 -07:00
parent 7e581b9a7b
commit 37b5741301
2 changed files with 11 additions and 11 deletions

View file

@ -1,12 +1,12 @@
# Block Devices # Block Devices
type efs_block_device, dev_type; type efs_block_device, dev_type, bdev_type;
type fat_block_device, dev_type; type fat_block_device, dev_type, bdev_type;
type modem_block_device, dev_type; type modem_block_device, dev_type, bdev_type;
type modem_userdata_block_device, dev_type; type modem_userdata_block_device, dev_type, bdev_type;
type persist_block_device, dev_type; type persist_block_device, dev_type, bdev_type;
type vendor_block_device, dev_type; type vendor_block_device, dev_type, bdev_type;
type sda_block_device, dev_type; type sda_block_device, dev_type, bdev_type;
type mfg_data_block_device, dev_type; type mfg_data_block_device, dev_type, bdev_type;
# Exynos devices # Exynos devices
type vendor_m2m1shot_device, dev_type; type vendor_m2m1shot_device, dev_type;
@ -14,8 +14,8 @@ type vendor_gnss_device, dev_type;
type vendor_nanohub_device, dev_type; type vendor_nanohub_device, dev_type;
type vendor_secmem_device, dev_type; type vendor_secmem_device, dev_type;
type vendor_toe_device, dev_type; type vendor_toe_device, dev_type;
type custom_ab_block_device, dev_type; type custom_ab_block_device, dev_type, bdev_type;
type devinfo_block_device, dev_type; type devinfo_block_device, dev_type, bdev_type;
# usbpd # usbpd
type logbuffer_device, dev_type; type logbuffer_device, dev_type;

View file

@ -78,7 +78,7 @@ type updated_wifi_firmware_data_file, file_type, data_file_type;
type mediadrm_vendor_data_file, file_type, data_file_type; type mediadrm_vendor_data_file, file_type, data_file_type;
# Storage Health HAL # Storage Health HAL
type sysfs_scsi_devices_0000, sysfs_type, fs_type; type sysfs_scsi_devices_0000, sysfs_type, fs_type, sysfs_block_type;
type debugfs_f2fs, debugfs_type, fs_type; type debugfs_f2fs, debugfs_type, fs_type;
type proc_f2fs, proc_type, fs_type; type proc_f2fs, proc_type, fs_type;