1*e4a36f41SAndroid Build Coastguard Workerallow e2fs devpts:chr_file { read write getattr ioctl }; 2*e4a36f41SAndroid Build Coastguard Worker 3*e4a36f41SAndroid Build Coastguard Workerallow e2fs dev_type:blk_file getattr; 4*e4a36f41SAndroid Build Coastguard Workerallow e2fs block_device:dir search; 5*e4a36f41SAndroid Build Coastguard Workerallow e2fs userdata_block_device:blk_file rw_file_perms; 6*e4a36f41SAndroid Build Coastguard Workerallow e2fs metadata_block_device:blk_file rw_file_perms; 7*e4a36f41SAndroid Build Coastguard Workerallow e2fs dm_device:blk_file rw_file_perms; 8*e4a36f41SAndroid Build Coastguard Workerallow e2fs zoned_block_device:blk_file rw_file_perms; 9*e4a36f41SAndroid Build Coastguard Worker# Vold needs to capture mkfs.ext4's output 10*e4a36f41SAndroid Build Coastguard Workerallow e2fs vold:fd use; 11*e4a36f41SAndroid Build Coastguard Worker# Need to be able to format a partition 12*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_dm:dir r_dir_perms; 13*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_dm:file r_file_perms; 14*e4a36f41SAndroid Build Coastguard Worker 15*e4a36f41SAndroid Build Coastguard Workerallowxperm e2fs { userdata_block_device metadata_block_device dm_device zoned_block_device }:blk_file ioctl { 16*e4a36f41SAndroid Build Coastguard Worker BLKSECDISCARD BLKDISCARD BLKPBSZGET BLKDISCARDZEROES BLKROGET BLKREPORTZONE BLKRESETZONE 17*e4a36f41SAndroid Build Coastguard Worker}; 18*e4a36f41SAndroid Build Coastguard Worker 19*e4a36f41SAndroid Build Coastguard Workerallow e2fs { 20*e4a36f41SAndroid Build Coastguard Worker proc_filesystems 21*e4a36f41SAndroid Build Coastguard Worker proc_mounts 22*e4a36f41SAndroid Build Coastguard Worker proc_swaps 23*e4a36f41SAndroid Build Coastguard Worker}:file r_file_perms; 24*e4a36f41SAndroid Build Coastguard Worker 25*e4a36f41SAndroid Build Coastguard Worker# access /sys/fs/ext4/features 26*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_fs_ext4_features:dir search; 27*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_fs_ext4_features:file r_file_perms; 28*e4a36f41SAndroid Build Coastguard Worker 29*e4a36f41SAndroid Build Coastguard Worker# access SELinux context files 30*e4a36f41SAndroid Build Coastguard Workerallow e2fs file_contexts_file:file r_file_perms; 31