healthd.te 1.41 KB
Newer Older
Todd Poynor's avatar
Todd Poynor committed
1 2
# healthd seclabel is specified in init.rc since
# it lives in the rootfs and has no unique file type.
3
type healthd, domain, domain_deprecated;
Todd Poynor's avatar
Todd Poynor committed
4

5 6
# Write to /dev/kmsg
allow healthd kmsg_device:chr_file rw_file_perms;
Todd Poynor's avatar
Todd Poynor committed
7

8
allow healthd self:capability { net_admin sys_tty_config };
Nick Kralevich's avatar
Nick Kralevich committed
9
wakelock_use(healthd)
10 11
allow healthd self:netlink_kobject_uevent_socket create_socket_perms;
binder_use(healthd)
Nick Kralevich's avatar
Nick Kralevich committed
12
binder_service(healthd)
13
binder_call(healthd, system_server)
Nick Kralevich's avatar
Nick Kralevich committed
14

Stephen Smalley's avatar
Stephen Smalley committed
15 16 17 18
# Write to state file.
# TODO:  Split into a separate type?
allow healthd sysfs:file write;

dcashman's avatar
dcashman committed
19 20
allow healthd sysfs_batteryinfo:file r_file_perms;

Nick Kralevich's avatar
Nick Kralevich committed
21 22 23 24
###
### healthd: charger mode
###

25 26 27 28 29 30
# Read /sys/fs/pstore/console-ramoops
# Don't worry about overly broad permissions for now, as there's
# only one file in /sys/fs/pstore
allow healthd pstorefs:dir r_dir_perms;
allow healthd pstorefs:file r_file_perms;

Nick Kralevich's avatar
Nick Kralevich committed
31 32 33 34
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;
Stephen Smalley's avatar
Stephen Smalley committed
35
allow healthd tty_device:chr_file rw_file_perms;
Nick Kralevich's avatar
Nick Kralevich committed
36 37
allow healthd ashmem_device:chr_file execute;
allow healthd self:process execmem;
38 39
allow healthd proc_sysrq:file rw_file_perms;
allow healthd self:capability sys_boot;
40

41
allow healthd healthd_service:service_manager { add find };
42

43 44
# Healthd needs to tell init to continue the boot
# process when running in charger mode.
45
set_prop(healthd, system_prop)