2013-06-03 23:09:54 +02:00
|
|
|
# healthd seclabel is specified in init.rc since
|
|
|
|
# it lives in the rootfs and has no unique file type.
|
|
|
|
type healthd, domain;
|
|
|
|
|
2013-11-04 15:53:46 +01:00
|
|
|
allow healthd rootfs:file { read entrypoint };
|
2013-06-03 23:09:54 +02:00
|
|
|
write_klog(healthd)
|
2014-01-22 19:23:02 +01:00
|
|
|
# /dev/__null__ created by init prior to policy load,
|
|
|
|
# open fd inherited by healthd.
|
|
|
|
allow healthd tmpfs:chr_file { read write };
|
2013-06-03 23:09:54 +02:00
|
|
|
|
2014-03-14 23:37:25 +01:00
|
|
|
allow healthd self:capability { net_admin mknod sys_tty_config };
|
2014-05-23 22:33:32 +02:00
|
|
|
wakelock_use(healthd)
|
2013-11-04 15:53:46 +01:00
|
|
|
allow healthd self:netlink_kobject_uevent_socket create_socket_perms;
|
|
|
|
binder_use(healthd)
|
2013-12-14 07:19:45 +01:00
|
|
|
binder_service(healthd)
|
2013-11-04 15:53:46 +01:00
|
|
|
binder_call(healthd, system_server)
|
2014-01-28 01:15:00 +01:00
|
|
|
|
2014-03-11 13:51:42 +01:00
|
|
|
# Write to state file.
|
|
|
|
# TODO: Split into a separate type?
|
|
|
|
allow healthd sysfs:file write;
|
|
|
|
|
2014-01-28 01:15:00 +01:00
|
|
|
###
|
|
|
|
### healthd: charger mode
|
|
|
|
###
|
|
|
|
|
|
|
|
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;
|
2014-03-11 13:51:42 +01:00
|
|
|
allow healthd tty_device:chr_file rw_file_perms;
|
2014-01-28 01:15:00 +01:00
|
|
|
allow healthd ashmem_device:chr_file execute;
|
|
|
|
allow healthd self:process execmem;
|
2014-03-17 18:02:06 +01:00
|
|
|
allow healthd proc_sysrq:file rw_file_perms;
|
|
|
|
allow healthd self:capability sys_boot;
|
2014-06-06 00:52:02 +02:00
|
|
|
allow healthd healthd_service:service_manager add;
|
2014-06-17 23:30:14 +02:00
|
|
|
|
|
|
|
# Healthd needs to tell init to continue the boot
|
|
|
|
# process when running in charger mode.
|
|
|
|
unix_socket_connect(healthd, property, init)
|
|
|
|
allow healthd system_prop:property_service set;
|