aboutsummaryrefslogtreecommitdiffstats
path: root/sepolicy/mkfs.te
diff options
context:
space:
mode:
Diffstat (limited to 'sepolicy/mkfs.te')
-rw-r--r--sepolicy/mkfs.te9
1 files changed, 9 insertions, 0 deletions
diff --git a/sepolicy/mkfs.te b/sepolicy/mkfs.te
new file mode 100644
index 00000000..fe7c61bb
--- /dev/null
+++ b/sepolicy/mkfs.te
@@ -0,0 +1,9 @@
+type mkfs, domain;
+type mkfs_exec, exec_type, file_type;
+
+init_daemon_domain(mkfs)
+
+# Allow formatting userdata or cache partitions
+allow mkfs block_device:dir search;
+allow mkfs userdata_block_device:blk_file rw_file_perms;
+allow mkfs cache_block_device:blk_file rw_file_perms;