From 855ffe588e51ea5ac4eeb1203dc43f1b245b4f56 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep <jeffv@google.com> Date: Wed, 2 Dec 2015 13:29:20 -0800 Subject: [PATCH] bootanim: Remove domain_deprecated Remove domain_deprecated from bootanim. This removes some unnecessarily permissive rules. As part of this, re-allow access to cgroups, proc and sysfs, removed as a result of removing domain_deprecated. Bug: 25433265 Change-Id: I58658712666c719c8f5a39fe2076c4f6d166616c --- bootanim.te | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/bootanim.te b/bootanim.te index 9e04c04ca..ee5bcae75 100644 --- a/bootanim.te +++ b/bootanim.te @@ -1,5 +1,5 @@ # bootanimation oneshot service -type bootanim, domain, domain_deprecated; +type bootanim, domain; type bootanim_exec, exec_type, file_type; init_daemon_domain(bootanim) @@ -17,3 +17,24 @@ allow bootanim audio_device:dir r_dir_perms; allow bootanim audio_device:chr_file rw_file_perms; allow bootanim surfaceflinger_service:service_manager find; + +# For /acct/uid/*/tasks. +allow bootanim cgroup:dir { search write }; +allow bootanim cgroup:file w_file_perms; + +# debugfs access +allow bootanim debugfs:dir r_dir_perms; +allow bootanim debugfs:file w_file_perms; + +# Allow access to ion memory allocation device +allow bootanim ion_device:chr_file rw_file_perms; + +# Read access to pseudo filesystems. +r_dir_file(bootanim, proc) +r_dir_file(bootanim, sysfs) +r_dir_file(bootanim, sysfs_devices_system_cpu) +r_dir_file(bootanim, cgroup) +allow bootanim proc_cpuinfo:file r_file_perms; + +# System file accesses. +allow bootanim system_file:dir r_dir_perms; -- GitLab