healthd.te 1.47 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 9 10
# Read access to pseudo filesystems.
r_dir_file(healthd, sysfs)

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

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

dcashman's avatar
dcashman committed
22 23
allow healthd sysfs_batteryinfo:file r_file_perms;

Nick Kralevich's avatar
Nick Kralevich committed
24 25 26 27
###
### healthd: charger mode
###

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

44
allow healthd healthd_service:service_manager { add find };
45

46 47
# Healthd needs to tell init to continue the boot
# process when running in charger mode.
48
set_prop(healthd, system_prop)