Andreas Gampe | 4c2d06c | 2019-02-21 10:03:07 -0800 | [diff] [blame] | 1 | # ART APEX postinstall. |
| 2 | # |
| 3 | |
| 4 | type art_apex_postinstall, domain, coredomain; |
| 5 | type art_apex_postinstall_exec, system_file_type, exec_type, file_type; |
| 6 | |
Andreas Gampe | 15e0245 | 2019-03-11 11:01:11 -0700 | [diff] [blame] | 7 | # /system/bin/sh (see b/126787589). |
Andreas Gampe | 4c2d06c | 2019-02-21 10:03:07 -0800 | [diff] [blame] | 8 | allow art_apex_postinstall apexd:fd use; |
| 9 | |
| 10 | # Read temp dirs and files. Move directories. |
| 11 | allow art_apex_postinstall ota_data_file:dir { r_dir_perms write rename remove_name relabelfrom reparent }; |
| 12 | allow art_apex_postinstall ota_data_file:file { r_file_perms relabelfrom }; |
| 13 | # We're deleting the old /data/dalvik-cache/* and move the new ones |
| 14 | # over. |
| 15 | allow art_apex_postinstall dalvikcache_data_file:dir { create_dir_perms relabelto }; |
| 16 | allow art_apex_postinstall dalvikcache_data_file:file { r_file_perms unlink relabelto }; |
| 17 | |
| 18 | # Required for relabel. |
| 19 | allow art_apex_postinstall file_contexts_file:file r_file_perms; |
Andreas Gampe | 7263cb4 | 2019-03-12 10:49:16 -0700 | [diff] [blame] | 20 | allow art_apex_postinstall self:global_capability_class_set sys_admin; |
Andreas Gampe | 4c2d06c | 2019-02-21 10:03:07 -0800 | [diff] [blame] | 21 | |
| 22 | # Script helpers. |
| 23 | allow art_apex_postinstall shell_exec:file rx_file_perms; |
| 24 | allow art_apex_postinstall toolbox_exec:file rx_file_perms; |
Andreas Gampe | 67e14ad | 2019-02-28 16:51:12 -0800 | [diff] [blame] | 25 | |
| 26 | # Fsverity in the same domain. |
| 27 | allow art_apex_postinstall system_file:file execute_no_trans; |
| 28 | # Fsverity work. |
| 29 | allowxperm art_apex_postinstall ota_data_file:file ioctl { |
| 30 | FS_IOC_ENABLE_VERITY FS_IOC_MEASURE_VERITY |
| 31 | }; |