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;
11allowxperm e2fs { userdata_block_device metadata_block_device dm_device }:blk_file ioctl {
12  BLKSECDISCARD BLKDISCARD BLKPBSZGET BLKDISCARDZEROES BLKROGET
13};
14
15allow e2fs {
16  proc_filesystems
17  proc_mounts
18  proc_swaps
19}:file r_file_perms;
20
21# access /sys/fs/ext4/features
22allow e2fs sysfs_fs_ext4_features:dir search;
23allow e2fs sysfs_fs_ext4_features:file r_file_perms;
24
25# access SELinux context files
26allow e2fs file_contexts_file:file r_file_perms;
27