blob: 7866b2043467d43bee7b76faa3956be30a88acfc [file] [log] [blame]
Inseob Kim7560aed2021-07-20 09:57:57 +00001# TODO(b/193504816): move this to compos APEX
Inseob Kim1f87fbd2021-07-26 05:56:31 +00002type compos, domain, coredomain, microdroid_payload;
Inseob Kim7560aed2021-07-20 09:57:57 +00003type compos_exec, exec_type, file_type, system_file_type;
4
Inseob Kim7560aed2021-07-20 09:57:57 +00005allow compos self:vsock_socket { create_socket_perms_no_ioctl listen accept };
6
Victor Hsiehaa987aa2021-08-10 16:33:32 -07007# Allow using keystore and authfs_service binder services
Inseob Kim1f87fbd2021-07-26 05:56:31 +00008binder_use(compos);
Inseob Kim1f87fbd2021-07-26 05:56:31 +00009use_keystore(compos);
Victor Hsiehaa987aa2021-08-10 16:33:32 -070010allow compos authfs_binder_service:service_manager find;
11binder_call(compos, authfs_service);
Inseob Kim1f87fbd2021-07-26 05:56:31 +000012
13# Allow payloads to use and manage their keys
14allow compos vm_payload_key:keystore2_key {
15 delete
16 get_info
17 manage_blob
18 rebind
19 use
20};
Victor Hsiehaa987aa2021-08-10 16:33:32 -070021
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.
25allow compos authfs_fuse:file { read write };
26
Victor Hsieh5f6e4322021-08-13 15:30:36 -070027# Allow getattr (in fact, getxattr) as a workaround to retrieve fs-verity
28# metadata. See b/196635431.
29allow compos authfs_fuse:file getattr;
30
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080031# Allow creating the odrefresh output directory in authfs.
32allow compos authfs_fuse:dir create_dir_perms;
33
34# Allow locating the authfs mount directory.
35allow 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.
39domain_auto_trans(compos, odrefresh_exec, odrefresh)
Victor Hsiehaa987aa2021-08-10 16:33:32 -070040domain_auto_trans(compos, dex2oat_exec, dex2oat)