From c6f5c53f81bbd6aa02a6e74ce541c0ff0950cded Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 8 Jul 2019 10:25:44 +0200 Subject: [PATCH] sm8150-common: sepolicy: Import tri-state-key rules from sdm845-common Change-Id: I1c0044a9bd3176d610d83eaae965ef35bc042fe0 --- sepolicy/private/file_contexts | 2 ++ sepolicy/private/tri-state-key_daemon.te | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 sepolicy/private/file_contexts create mode 100644 sepolicy/private/tri-state-key_daemon.te diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts new file mode 100644 index 00000000..4c3a8c19 --- /dev/null +++ b/sepolicy/private/file_contexts @@ -0,0 +1,2 @@ +# Binaries +/system/bin/tri-state-key_daemon u:object_r:tri-state-key_daemon_exec:s0 diff --git a/sepolicy/private/tri-state-key_daemon.te b/sepolicy/private/tri-state-key_daemon.te new file mode 100644 index 00000000..108c7ab8 --- /dev/null +++ b/sepolicy/private/tri-state-key_daemon.te @@ -0,0 +1,7 @@ +type tri-state-key_daemon, domain, coredomain; +type tri-state-key_daemon_exec, exec_type, file_type; + +init_daemon_domain(tri-state-key_daemon) + +allow tri-state-key_daemon uhid_device:chr_file rw_file_perms; +allow tri-state-key_daemon self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;