platform_system_sepolicy/private/system_suspend.te
Benjamin Schwartz 3e4d97b158 Added read only suspend hal properties
Bug: 170587692
Test: Inspected logs to confirm android.system.suspend can access the
properties

Change-Id: Ie6a84afe490df0d2b11ff4f06588c7bca68d9850
2020-11-09 15:47:12 -08:00

44 lines
1.6 KiB
Text

type system_suspend, domain, coredomain, system_suspend_server;
type system_suspend_exec, system_file_type, exec_type, file_type;
init_daemon_domain(system_suspend)
# To serve ISuspendControlService and ISuspendControlServiceInternal.
binder_use(system_suspend)
add_service(system_suspend, system_suspend_control_internal_service)
add_service(system_suspend, system_suspend_control_service)
# Access to /sys/power/{ wakeup_count, state } suspend interface.
allow system_suspend sysfs_power:file rw_file_perms;
# Access to wakeup, suspend stats, and wakeup reasons.
r_dir_file(system_suspend, sysfs_suspend_stats)
r_dir_file(system_suspend, sysfs_wakeup)
r_dir_file(system_suspend, sysfs_wakeup_reasons)
# To resolve arbitrary sysfs paths from /sys/class/wakeup/* symlinks.
allow system_suspend sysfs_type:dir search;
# Access to suspend_hal system properties
get_prop(system_suspend, suspend_prop)
# To call BTAA registered callbacks
allow system_suspend bluetooth:binder call;
neverallow {
domain
-atrace # tracing
-dumpstate # bug reports
-system_suspend # implements system_suspend_control_internal_service
-system_server # configures system_suspend via ISuspendControlServiceInternal
-traceur_app # tracing
} system_suspend_control_internal_service:service_manager find;
neverallow {
domain
-atrace # tracing
-bluetooth # support Bluetooth activity attribution (BTAA)
-dumpstate # bug reports
-system_suspend # implements system_suspend_control_service
-system_server # configures system_suspend via ISuspendControlService
-traceur_app # tracing
} system_suspend_control_service:service_manager find;