system_suspend: sysfs path resolution
/sys/class/wakeup/wakeupN can point to an arbitrary path in sysfs. Add
"search" permission for path resolution.
Bug: 144095608
Test: m selinux_policy
Change-Id: I033d15b4ca56656f144189f5c2b1b885f30155a3
diff --git a/private/system_suspend.te b/private/system_suspend.te
index b600c66..d33dc8e 100644
--- a/private/system_suspend.te
+++ b/private/system_suspend.te
@@ -13,6 +13,8 @@
# Access to wakeup and suspend stats.
r_dir_file(system_suspend, sysfs_suspend_stats)
r_dir_file(system_suspend, sysfs_wakeup)
+# To resolve arbitrary sysfs paths from /sys/class/wakeup/* symlinks.
+allow system_suspend sysfs_type:dir search;
neverallow {
domain