2016-03-29 15:08:20 -07:00
|
|
|
# otapreopt_chroot executable
|
|
|
|
type otapreopt_chroot, domain;
|
|
|
|
type otapreopt_chroot_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
# Chroot preparation and execution.
|
|
|
|
# We need to create an unshared mount namespace, and then mount /data.
|
|
|
|
allow otapreopt_chroot postinstall_file:dir { search mounton };
|
2017-11-09 14:51:26 -08:00
|
|
|
allow otapreopt_chroot self:global_capability_class_set { sys_admin sys_chroot };
|
2016-03-29 15:08:20 -07:00
|
|
|
|
2016-07-12 09:48:52 -07:00
|
|
|
# This is required to mount /vendor.
|
|
|
|
allow otapreopt_chroot block_device:dir search;
|
|
|
|
allow otapreopt_chroot labeledfs:filesystem mount;
|
2016-10-05 16:19:39 -07:00
|
|
|
# Mounting /vendor can have this side-effect. Ignore denial.
|
|
|
|
dontaudit otapreopt_chroot kernel:process setsched;
|
2016-07-12 09:48:52 -07:00
|
|
|
|
2016-07-08 18:31:10 -07:00
|
|
|
# Allow otapreopt to use file descriptors from update-engine. It will
|
|
|
|
# close them immediately.
|
|
|
|
allow otapreopt_chroot postinstall:fd use;
|
|
|
|
allow otapreopt_chroot update_engine:fd use;
|
|
|
|
allow otapreopt_chroot update_engine:fifo_file write;
|