Add sysfs rule for vibrator in system_server
Helps fix vibrator HAL open issue
avc: denied { write } for pid=907 comm="system_server" name="enable" dev="sysfs" ino=20423 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file permissive=0
Bug: 32209928
Bug: 32225232
Test: m, booted, tested keypad to make sure vibrator works
Change-Id: I4977c42b7fac0c9503be04b6520487f2d6cbc903
diff --git a/public/system_server.te b/public/system_server.te
index 54b3fa8..9805a1a 100644
--- a/public/system_server.te
+++ b/public/system_server.te
@@ -197,6 +197,9 @@
allow system_server sysfs_thermal:dir search;
allow system_server sysfs_thermal:file r_file_perms;
+# TODO: Remove when HALs are forced into separate processes
+allow system_server sysfs_vibrator:file write;
+
# TODO: added to match above sysfs rule. Remove me?
allow system_server sysfs_usb:file w_file_perms;