blob: 386f11ed86702db4391ef7b46e420a1c12a8e197 [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 Stokes0c5449b2022-02-17 18:01:46 +000010allow compos authfs_binder_service:service_manager find;
Victor Hsiehaa987aa2021-08-10 16:33:32 -070011binder_call(compos, authfs_service);
Victor Hsiehaa987aa2021-08-10 16:33:32 -070012
Alan Stokes14f18872021-12-16 13:40:21 +000013# Read artifacts created by odrefresh and create signature files.
Alan Stokes14f18872021-12-16 13:40:21 +000014allow compos authfs_fuse:dir rw_dir_perms;
15allow compos authfs_fuse:file create_file_perms;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080016
17# Allow locating the authfs mount directory.
Alan Stokes14f18872021-12-16 13:40:21 +000018allow compos authfs_data_file:dir search;
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080019
Alan Stokesd3132822022-01-05 16:05:54 +000020# Run derive_classpath in our domain
21allow compos derive_classpath_exec:file rx_file_perms;
22allow compos apex_mnt_dir:dir r_dir_perms;
23# Ignore harmless denials on /proc/self/fd
24dontaudit compos self:dir write;
25# See b/35323867#comment3
26dontaudit compos self:global_capability_class_set dac_override;
27
Victor Hsieh3423bc42022-05-10 16:14:30 -070028# Allow settings system properties that ART expects.
29set_prop(compos, dalvik_config_prop)
30set_prop(compos, device_config_runtime_native_boot_prop)
31
Alan Stokes766caba2022-02-14 14:33:37 +000032# Allow running odrefresh in its own domain
Victor Hsiehf97cc1f2021-11-30 14:43:47 -080033domain_auto_trans(compos, odrefresh_exec, odrefresh)
Alan Stokes766caba2022-02-14 14:33:37 +000034
35# Allow running compos_key_helper in its own domain
36domain_auto_trans(compos, compos_key_helper_exec, compos_key_helper)
37# And killing it on error
38allow compos compos_key_helper:process sigkill;