blob: 174eda36243b443226f091f51a560a5040e32661 [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
Alan Stokes14f18872021-12-16 13:40:21 +000022# Read artifacts created by odrefresh and create signature files.
Alan Stokes14f18872021-12-16 13:40:21 +000023allow compos authfs_fuse:dir rw_dir_perms;
24allow compos authfs_fuse:file create_file_perms;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080025
26# Allow locating the authfs mount directory.
Alan Stokes14f18872021-12-16 13:40:21 +000027allow compos authfs_data_file:dir search;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080028
Alan Stokesd3132822022-01-05 16:05:54 +000029# Run derive_classpath in our domain
30allow compos derive_classpath_exec:file rx_file_perms;
31allow compos apex_mnt_dir:dir r_dir_perms;
32# Ignore harmless denials on /proc/self/fd
33dontaudit compos self:dir write;
34# See b/35323867#comment3
35dontaudit compos self:global_capability_class_set dac_override;
36
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080037# 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)