Nick Kralevich | 748fdef | 2013-07-12 16:33:29 -0700 | [diff] [blame] | 1 | ### |
| 2 | ### Apps signed with the platform key. |
| 3 | ### |
| 4 | |
| 5 | type platform_app, domain; |
Nick Kralevich | 748fdef | 2013-07-12 16:33:29 -0700 | [diff] [blame] | 6 | app_domain(platform_app) |
Nick Kralevich | 748fdef | 2013-07-12 16:33:29 -0700 | [diff] [blame] | 7 | # Access the network. |
| 8 | net_domain(platform_app) |
| 9 | # Access bluetooth. |
| 10 | bluetooth_domain(platform_app) |
Stephen Smalley | b0db712 | 2014-03-06 16:03:48 -0500 | [diff] [blame] | 11 | # Read from /data/local/tmp or /data/data/com.android.shell. |
Stephen Smalley | 5637099 | 2013-10-23 13:12:55 -0400 | [diff] [blame] | 12 | allow platform_app shell_data_file:dir search; |
| 13 | allow platform_app shell_data_file:file { open getattr read }; |
Stephen Smalley | 5637099 | 2013-10-23 13:12:55 -0400 | [diff] [blame] | 14 | # Populate /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files |
| 15 | # created by system server. |
Jeff Sharkey | d335682 | 2014-07-09 14:58:46 -0700 | [diff] [blame] | 16 | allow platform_app { apk_tmp_file apk_private_tmp_file }:dir rw_dir_perms; |
Stephen Smalley | 5637099 | 2013-10-23 13:12:55 -0400 | [diff] [blame] | 17 | allow platform_app { apk_tmp_file apk_private_tmp_file }:file rw_file_perms; |
| 18 | allow platform_app apk_private_data_file:dir search; |
| 19 | # ASEC |
| 20 | allow platform_app asec_apk_file:dir create_dir_perms; |
| 21 | allow platform_app asec_apk_file:file create_file_perms; |
Stephen Smalley | 5637099 | 2013-10-23 13:12:55 -0400 | [diff] [blame] | 22 | |
Stephen Smalley | 9ba844f | 2014-04-04 09:09:25 -0400 | [diff] [blame] | 23 | # Access to /data/media. |
| 24 | allow platform_app media_rw_data_file:dir create_dir_perms; |
| 25 | allow platform_app media_rw_data_file:file create_file_perms; |
| 26 | |
| 27 | # Write to /cache. |
| 28 | allow platform_app cache_file:dir create_dir_perms; |
| 29 | allow platform_app cache_file:file create_file_perms; |
Filipe Gonçalves | 51ca8cc | 2016-05-12 13:53:45 +0100 | [diff] [blame] | 30 | |
| 31 | # /persist -> board date lives there, so access is needed within SystemUI |
| 32 | allow platform_app persist_file:dir r_dir_perms; |
| 33 | allow platform_app persist_file:file r_file_perms; |