xref: /aosp_15_r20/system/sepolicy/prebuilts/api/31.0/public/e2fs.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
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 Workerallowxperm e2fs { userdata_block_device metadata_block_device dm_device }:blk_file ioctl {
12*e4a36f41SAndroid Build Coastguard Worker  BLKSECDISCARD BLKDISCARD BLKPBSZGET BLKDISCARDZEROES BLKROGET
13*e4a36f41SAndroid Build Coastguard Worker};
14*e4a36f41SAndroid Build Coastguard Worker
15*e4a36f41SAndroid Build Coastguard Workerallow e2fs {
16*e4a36f41SAndroid Build Coastguard Worker  proc_filesystems
17*e4a36f41SAndroid Build Coastguard Worker  proc_mounts
18*e4a36f41SAndroid Build Coastguard Worker  proc_swaps
19*e4a36f41SAndroid Build Coastguard Worker}:file r_file_perms;
20*e4a36f41SAndroid Build Coastguard Worker
21*e4a36f41SAndroid Build Coastguard Worker# access /sys/fs/ext4/features
22*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_fs_ext4_features:dir search;
23*e4a36f41SAndroid Build Coastguard Workerallow e2fs sysfs_fs_ext4_features:file r_file_perms;
24*e4a36f41SAndroid Build Coastguard Worker
25*e4a36f41SAndroid Build Coastguard Worker# access SELinux context files
26*e4a36f41SAndroid Build Coastguard Workerallow e2fs file_contexts_file:file r_file_perms;
27