platform_system_sepolicy/private/virtmanager.te
Andrew Walbran a995e84c18 Add crosvm domain and give virtmanager and crosvm necessary permissions.
Bug: 183583115
Test: make TARGET_KERNEL_USE=5.4 TARGET_VIM3L=true
Change-Id: I566436fa2d27597566014f2a63198a88d6d2dbd6
2021-04-13 09:30:20 +00:00

17 lines
642 B
Text

type virtmanager, domain, coredomain;
type virtmanager_exec, system_file_type, exec_type, file_type;
# When init runs a file labelled with virtmanager_exec, run it in the virtmanager domain.
init_daemon_domain(virtmanager)
# Let the virtmanager domain use Binder.
binder_use(virtmanager)
# Let the virtmanager domain register the virtualization_service with ServiceManager.
add_service(virtmanager, virtualization_service)
# When virtmanager execs a file with the crosvm_exec label, run it in the crosvm domain.
domain_auto_trans(virtmanager, crosvm_exec, crosvm)
# Let virtmanager kill crosvm.
allow virtmanager crosvm:process sigkill;