2021-09-09 18:08:15 +02:00
|
|
|
type composd, domain, coredomain;
|
|
|
|
type composd_exec, system_file_type, exec_type, file_type;
|
|
|
|
|
2021-11-19 18:33:34 +01:00
|
|
|
# Host dynamic AIDL services
|
2021-09-09 18:08:15 +02:00
|
|
|
init_daemon_domain(composd)
|
|
|
|
binder_use(composd)
|
|
|
|
add_service(composd, compos_service)
|
|
|
|
|
2021-10-19 17:50:24 +02:00
|
|
|
# Call back into system server
|
|
|
|
binder_call(composd, system_server)
|
|
|
|
|
2021-09-09 18:08:15 +02:00
|
|
|
# Start a VM
|
|
|
|
virtualizationservice_use(composd)
|
|
|
|
|
2021-12-16 15:31:14 +01:00
|
|
|
# Prepare staging directory for odrefresh
|
2021-12-04 01:46:18 +01:00
|
|
|
allow composd apex_art_data_file:dir { create_dir_perms relabelfrom };
|
|
|
|
allow composd apex_art_staging_data_file:dir { create_dir_perms relabelto };
|
2021-12-21 15:43:39 +01:00
|
|
|
allow composd apex_art_staging_data_file:file { getattr unlink };
|
2021-12-04 01:46:18 +01:00
|
|
|
|
2021-12-16 15:31:14 +01:00
|
|
|
# Delete files in the odrefresh target directory
|
|
|
|
allow composd apex_art_data_file:file unlink;
|
|
|
|
|
2021-09-09 18:08:15 +02:00
|
|
|
# Access our APEX data files
|
|
|
|
allow composd apex_module_data_file:dir search;
|
|
|
|
allow composd apex_compos_data_file:dir create_dir_perms;
|
|
|
|
allow composd apex_compos_data_file:file create_file_perms;
|
2021-09-15 15:28:12 +02:00
|
|
|
|
2021-11-30 23:21:06 +01:00
|
|
|
# Run fd_server in its own domain, and send SIGTERM when finished.
|
|
|
|
domain_auto_trans(composd, fd_server_exec, compos_fd_server)
|
|
|
|
allow composd compos_fd_server:process signal;
|
|
|
|
|
2021-12-02 00:25:23 +01:00
|
|
|
# Read ART's properties
|
|
|
|
get_prop(composd, dalvik_config_prop)
|
2021-12-16 15:31:14 +01:00
|
|
|
|
|
|
|
# We never create any artifact files directly
|
|
|
|
neverallow composd apex_art_data_file:file ~unlink;
|