From ebc08e82a56e9a8ed51f9bf04c4106f66c3ef917 Mon Sep 17 00:00:00 2001 From: Stephen Smalley <sds@tycho.nsa.gov> Date: Tue, 11 Mar 2014 08:51:42 -0400 Subject: [PATCH] Address healthd denials. Resolve denials such as: avc: denied { write } for pid=130 comm="healthd" name="state" dev="sysfs" ino=57 scontext=u:r:healthd:s0 tcontext=u:object_r:sysfs:s0 tclass=file avc: denied { read write } for pid=130 comm="healthd" name="tty0" dev="tmpfs" ino=5677 scontext=u:r:healthd:s0 tcontext=u:object_r:tty_device:s0 tclass=chr_file Change-Id: Iff0609af924b4e5094be7512646140c3baa97549 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> --- healthd.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/healthd.te b/healthd.te index 63efd059d..62a20e8bc 100644 --- a/healthd.te +++ b/healthd.te @@ -15,6 +15,10 @@ binder_use(healthd) binder_service(healthd) binder_call(healthd, system_server) +# Write to state file. +# TODO: Split into a separate type? +allow healthd sysfs:file write; + ### ### healthd: charger mode ### @@ -23,5 +27,6 @@ allow healthd graphics_device:dir r_dir_perms; allow healthd graphics_device:chr_file rw_file_perms; allow healthd input_device:dir r_dir_perms; allow healthd input_device:chr_file r_file_perms; +allow healthd tty_device:chr_file rw_file_perms; allow healthd ashmem_device:chr_file execute; allow healthd self:process execmem; -- GitLab