Skip to content
Snippets Groups Projects
Commit 9c769aff authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Allow the NFC process to access hwservicemanager.

Add a macro to make this easier for other processes
as well.

Change-Id: I489d0ce042fe5ef88dc767a6fbdb9b795be91601
(cherry picked from commit c2b9c1561e4bd7ac86d78b44ca7927994e781da0)
parent e13678f4
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,9 @@ app_domain(nfc) ...@@ -4,6 +4,9 @@ app_domain(nfc)
net_domain(nfc) net_domain(nfc)
binder_service(nfc) binder_service(nfc)
# hwbinder access
hwbinder_use(nfc)
# Set NFC properties # Set NFC properties
set_prop(nfc, nfc_prop) set_prop(nfc, nfc_prop)
......
...@@ -186,6 +186,20 @@ allow servicemanager $1:process getattr; ...@@ -186,6 +186,20 @@ allow servicemanager $1:process getattr;
# all domains in domain.te. # all domains in domain.te.
') ')
#####################################
# hwbinder_use(domain)
# Allow domain to use HwBinder IPC.
define(`hwbinder_use', `
# Call the hwservicemanager and transfer references to it.
allow $1 hwservicemanager:binder { call transfer };
# hwservicemanager performs getpidcon on clients.
allow hwservicemanager $1:dir search;
allow hwservicemanager $1:file { read open };
allow hwservicemanager $1:process getattr;
# rw access to /dev/hwbinder and /dev/ashmem is presently granted to
# all domains in domain.te.
')
##################################### #####################################
# binder_call(clientdomain, serverdomain) # binder_call(clientdomain, serverdomain)
# Allow clientdomain to perform binder IPC to serverdomain. # Allow clientdomain to perform binder IPC to serverdomain.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment