blob: fe8b2ba471afab0c1094762f4139ca0a86b6a438 [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001type 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
15# Allow e2fs to format /dev/block/vd*
16allow e2fs vd_device:blk_file rw_file_perms;
17allowxperm e2fs vd_device:blk_file ioctl {
18 BLKSECDISCARD BLKDISCARD BLKPBSZGET BLKDISCARDZEROES BLKROGET
19};
20
21allow e2fs {
22 proc_filesystems
23 proc_mounts
24 proc_swaps
25}:file r_file_perms;
26
27# access /sys/fs/ext4/features
28allow e2fs sysfs_fs_ext4_features:dir search;
29allow e2fs sysfs_fs_ext4_features:file r_file_perms;
30
31# access SELinux context files
32allow e2fs file_contexts_file:file r_file_perms;