add sepolicy for sendhint utility for sending hint
Bug: 269487607
Test: run sendhint command
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Id284ff8211cee6977d258551b9e2106960b013c2
diff --git a/power-libperfmgr/sendhint.te b/power-libperfmgr/sendhint.te
new file mode 100644
index 0000000..e453abe
--- /dev/null
+++ b/power-libperfmgr/sendhint.te
@@ -0,0 +1,8 @@
+# sendhint vendor
+type sendhint_vendor, domain;
+
+type sendhint_vendor_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(sendhint_vendor)
+hal_client_domain(sendhint_vendor, hal_power);
+# sendhint writes directly to kmsg during the boot process
+allow sendhint_vendor kmsg_device:chr_file { getattr w_file_perms };