Inseob Kim | 7560aed | 2021-07-20 09:57:57 +0000 | [diff] [blame] | 1 | # TODO(b/193504816): move this to compos APEX |
Inseob Kim | 1f87fbd | 2021-07-26 05:56:31 +0000 | [diff] [blame] | 2 | type compos, domain, coredomain, microdroid_payload; |
Inseob Kim | 7560aed | 2021-07-20 09:57:57 +0000 | [diff] [blame] | 3 | type compos_exec, exec_type, file_type, system_file_type; |
| 4 | |
Inseob Kim | 7560aed | 2021-07-20 09:57:57 +0000 | [diff] [blame] | 5 | allow compos self:vsock_socket { create_socket_perms_no_ioctl listen accept }; |
| 6 | |
Victor Hsieh | aa987aa | 2021-08-10 16:33:32 -0700 | [diff] [blame] | 7 | # Allow using keystore and authfs_service binder services |
Inseob Kim | 1f87fbd | 2021-07-26 05:56:31 +0000 | [diff] [blame] | 8 | binder_use(compos); |
Inseob Kim | 1f87fbd | 2021-07-26 05:56:31 +0000 | [diff] [blame] | 9 | use_keystore(compos); |
Victor Hsieh | aa987aa | 2021-08-10 16:33:32 -0700 | [diff] [blame] | 10 | allow compos authfs_binder_service:service_manager find; |
| 11 | binder_call(compos, authfs_service); |
Inseob Kim | 1f87fbd | 2021-07-26 05:56:31 +0000 | [diff] [blame] | 12 | |
| 13 | # Allow payloads to use and manage their keys |
| 14 | allow compos vm_payload_key:keystore2_key { |
| 15 | delete |
| 16 | get_info |
| 17 | manage_blob |
| 18 | rebind |
| 19 | use |
| 20 | }; |
Victor Hsieh | aa987aa | 2021-08-10 16:33:32 -0700 | [diff] [blame] | 21 | |
Alan Stokes | 14f1887 | 2021-12-16 13:40:21 +0000 | [diff] [blame] | 22 | # Read artifacts created by odrefresh and create signature files. |
Alan Stokes | 14f1887 | 2021-12-16 13:40:21 +0000 | [diff] [blame] | 23 | allow compos authfs_fuse:dir rw_dir_perms; |
| 24 | allow compos authfs_fuse:file create_file_perms; |
Victor Hsieh | f97cc1f | 2021-11-30 14:43:47 -0800 | [diff] [blame] | 25 | |
| 26 | # Allow locating the authfs mount directory. |
Alan Stokes | 14f1887 | 2021-12-16 13:40:21 +0000 | [diff] [blame] | 27 | allow compos authfs_data_file:dir search; |
Victor Hsieh | f97cc1f | 2021-11-30 14:43:47 -0800 | [diff] [blame] | 28 | |
| 29 | # Allow domain transition into odrefresh and dex2oat. |
| 30 | # TODO(b/209008712): Remove dex2oat once the migration is done. |
| 31 | domain_auto_trans(compos, odrefresh_exec, odrefresh) |
Victor Hsieh | aa987aa | 2021-08-10 16:33:32 -0700 | [diff] [blame] | 32 | domain_auto_trans(compos, dex2oat_exec, dex2oat) |