blob: e8960ef5f948291d3b39c135290385449986ab60 [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
Alan Stokes50d21952022-01-17 13:50:16 +00005# Expose RPC Binder service over vsock
Inseob Kim7560aed2021-07-20 09:57:57 +00006allow compos self:vsock_socket { create_socket_perms_no_ioctl listen accept };
7
Alan Stokes50d21952022-01-17 13:50:16 +00008# Allow using various binder services
Inseob Kim1f87fbd2021-07-26 05:56:31 +00009binder_use(compos);
Alan Stokes50d21952022-01-17 13:50:16 +000010allow compos {
11 authfs_binder_service
12 dice_node_service
13}:service_manager find;
Victor Hsiehaa987aa2021-08-10 16:33:32 -070014binder_call(compos, authfs_service);
Alan Stokes50d21952022-01-17 13:50:16 +000015binder_call(compos, diced);
Alan Stokes74094702022-01-21 12:07:03 +000016allow compos diced:diced { get_attestation_chain derive };
Victor Hsiehaa987aa2021-08-10 16:33:32 -070017
Alan Stokes14f18872021-12-16 13:40:21 +000018# Read artifacts created by odrefresh and create signature files.
Alan Stokes14f18872021-12-16 13:40:21 +000019allow compos authfs_fuse:dir rw_dir_perms;
20allow compos authfs_fuse:file create_file_perms;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080021
22# Allow locating the authfs mount directory.
Alan Stokes14f18872021-12-16 13:40:21 +000023allow compos authfs_data_file:dir search;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080024
Alan Stokesd3132822022-01-05 16:05:54 +000025# Run derive_classpath in our domain
26allow compos derive_classpath_exec:file rx_file_perms;
27allow compos apex_mnt_dir:dir r_dir_perms;
28# Ignore harmless denials on /proc/self/fd
29dontaudit compos self:dir write;
30# See b/35323867#comment3
31dontaudit compos self:global_capability_class_set dac_override;
32
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080033# Allow domain transition into odrefresh and dex2oat.
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080034domain_auto_trans(compos, odrefresh_exec, odrefresh)