Merge "Delete more unused policies by CompOS"

This commit is contained in:
Treehugger Robot 2022-01-25 20:54:41 +00:00 committed by Gerrit Code Review
commit fabaac131a
3 changed files with 3 additions and 16 deletions

View file

@ -30,5 +30,5 @@ dontaudit compos self:dir write;
# See b/35323867#comment3
dontaudit compos self:global_capability_class_set dac_override;
# Allow domain transition into odrefresh and dex2oat.
# Allow domain transition into odrefresh.
domain_auto_trans(compos, odrefresh_exec, odrefresh)

View file

@ -1,10 +1,6 @@
# Make ART inputs and outputs available to the CompOS VM
type compos_fd_server, domain, coredomain;
# Allow access to open fds inherited from odrefresh - read inputs, generate outputs
# TODO(b/209008712): Remove once migration is done.
allow compos_fd_server odrefresh:fd use;
# Allow access to open fds inherited from composd
allow compos_fd_server composd:fd use;
@ -17,18 +13,14 @@ allow compos_fd_server apex_art_data_file:dir create_dir_perms;
allow compos_fd_server apex_art_data_file:file create_file_perms;
# Use a pipe to signal readiness
# TODO(b/205750213): Removed odrefresh when we run odrefresh in the VM
allow compos_fd_server odrefresh:fifo_file write;
allow compos_fd_server composd:fifo_file write;
# TODO(b/196109647) - remove this when no longer needed by minijail
allow compos_fd_server odrefresh:fifo_file read;
allow compos_fd_server composd:fifo_file read;
# Create a listening vsock for the VM to connect back to
allow compos_fd_server self:vsock_socket { create_socket_perms_no_ioctl listen accept };
# Only composd and odrefresh can enter the domain via exec
# TODO(b/209008712): Remove odrefresh once migration is done.
neverallow { domain -composd -odrefresh } compos_fd_server:process transition;
# Only composd can enter the domain via exec
neverallow { domain -composd } compos_fd_server:process transition;
neverallow * compos_fd_server:process dyntransition;

View file

@ -25,11 +25,6 @@ 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;
# TODO(b/209008712): Remove these when we run odrefresh in the VM
# Run odrefresh to refresh ART artifacts, and kill it if we need to
domain_auto_trans(composd, odrefresh_exec, odrefresh)
allow composd odrefresh:process sigkill;
# 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;