1type e2fs, domain, coredomain; 2type e2fs_exec, system_file_type, exec_type, file_type; 3 4allow e2fs devpts:chr_file { read write getattr ioctl }; 5 6allow e2fs dev_type:blk_file getattr; 7allow e2fs block_device:dir search; 8allow e2fs userdata_block_device:blk_file rw_file_perms; 9allow e2fs metadata_block_device:blk_file rw_file_perms; 10allow e2fs dm_device:blk_file rw_file_perms; 11allow e2fs zoned_block_device:blk_file rw_file_perms; 12allowxperm e2fs { userdata_block_device metadata_block_device dm_device zoned_block_device }:blk_file ioctl { 13 BLKSECDISCARD BLKDISCARD BLKPBSZGET BLKDISCARDZEROES BLKROGET BLKREPORTZONE BLKRESETZONE 14}; 15 16allow e2fs { 17 proc_filesystems 18 proc_mounts 19 proc_swaps 20}:file r_file_perms; 21 22# access /sys/fs/ext4/features 23allow e2fs sysfs_fs_ext4_features:dir search; 24allow e2fs sysfs_fs_ext4_features:file r_file_perms; 25 26# access SELinux context files 27allow e2fs file_contexts_file:file r_file_perms; 28