sepolicy: Add permission for formatting user/cache partition

If the "formattable" fstab flag is set, init will tries
to format that partition, added the required policy to allow it.

Change-Id: I858b06aa3ff3ce775cf7676b09b9960f2558f7f6
This commit is contained in:
Keith Mok 2015-12-15 14:33:39 -08:00 committed by Ethan Chen
parent fcfc13ac6f
commit 6bc84be525
1 changed files with 4 additions and 0 deletions

4
sepolicy/init.te Normal file
View File

@ -0,0 +1,4 @@
# Allow formatting userdata or cache partitions
allow init block_device:dir search;
allow init userdata_block_device:blk_file rw_file_perms;
allow init cache_block_device:blk_file rw_file_perms;