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