android_device_asus_flo/sepolicy/thermald.te

48 lines
1.4 KiB
Plaintext

# Temperature sensor daemon (root process)
type thermald, domain;
type thermald_exec, exec_type, file_type;
# Started by init
init_daemon_domain(thermald)
allow thermald self:socket create_socket_perms;
allowxperm thermald self:socket ioctl msm_sock_ipc_ioctls;
# CPU hotplug uevent
allow thermald self:netlink_kobject_uevent_socket { create getopt setopt bind read };
allow thermald self:capability net_admin;
# Talk to qmuxd (/dev/socket/qmux_radio)
qmux_socket(thermald)
# Access shared logger (/dev/smem_log)
allow thermald smem_log_device:chr_file rw_file_perms;
# Allow writing in /sys/devices/system/cpu
allow thermald sysfs_devices_system_cpu:file w_file_perms;
# Access leds
allow thermald sysfs_leds:file rw_file_perms;
allow thermald sysfs_leds:dir r_dir_perms;
# Allow accessing thermal related sysfs nodes
allow thermald sysfs_thermal:file rw_file_perms;
allow thermald sysfs_thermal:dir r_dir_perms;
# Read the /sys/devices/virtual folder
allow thermald sysfs:dir r_dir_perms;
allow thermald sysfs:file r_file_perms;
# Access graphics related sysfs nodes
allow thermald sysfs_graphics:file rw_file_perms;
# Access /sys/devices/system/soc/soc0
r_dir_file(thermald, sysfs_socinfo)
# Connect to mpdecision.
allow thermald mpdecision_socket:dir r_dir_perms;
unix_socket_connect(thermald, mpdecision, mpdecision)
allow thermald sysfs_soc:dir r_dir_perms;
allow thermald sysfs_soc:file r_file_perms;