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 | |
| 22 | # Although the compos should not really read/write the FD on authfs_fuse, this |
| 23 | # is apparently required for the binder driver to pass the FDs to compos from |
| 24 | # authfs_service. |
| 25 | allow compos authfs_fuse:file { read write }; |
| 26 | |
Victor Hsieh | 5f6e432 | 2021-08-13 15:30:36 -0700 | [diff] [blame] | 27 | # Allow getattr (in fact, getxattr) as a workaround to retrieve fs-verity |
| 28 | # metadata. See b/196635431. |
| 29 | allow compos authfs_fuse:file getattr; |
| 30 | |
Victor Hsieh | f97cc1f | 2021-11-30 14:43:47 -0800 | [diff] [blame] | 31 | # Allow creating the odrefresh output directory in authfs. |
| 32 | allow compos authfs_fuse:dir create_dir_perms; |
| 33 | |
| 34 | # Allow locating the authfs mount directory. |
| 35 | allow compos authfs_data_file:dir { search }; |
| 36 | |
| 37 | # Allow domain transition into odrefresh and dex2oat. |
| 38 | # TODO(b/209008712): Remove dex2oat once the migration is done. |
| 39 | domain_auto_trans(compos, odrefresh_exec, odrefresh) |
Victor Hsieh | aa987aa | 2021-08-10 16:33:32 -0700 | [diff] [blame] | 40 | domain_auto_trans(compos, dex2oat_exec, dex2oat) |