platform_system_sepolicy/private/e2fs.te
Jin Qian 5f573ab2aa allow init to run mke2fs tools to format partitions
Test: let fs_mgr format a damaged /data partition
Bug: 35219933
Change-Id: If92352ea7a70780e9d81ab10963d63e16b793792
2017-05-09 10:58:45 -07:00

14 lines
406 B
Text

type e2fs, domain, coredomain;
allow e2fs block_device:blk_file getattr;
allow e2fs block_device:dir search;
allow e2fs userdata_block_device:blk_file rw_file_perms;
# access /proc/filesystems
allow e2fs proc:file r_file_perms;
# access /sys/fs/ext4/features
allow e2fs sysfs_fs_ext4_features:file r_file_perms;
# access sselinux context files
allow e2fs file_contexts_file:file { getattr open read };