Inseob Kim | ff43be2 | 2021-06-07 16:56:56 +0900 | [diff] [blame] | 1 | typeattribute hwservicemanager coredomain; |
| 2 | |
| 3 | init_daemon_domain(hwservicemanager) |
| 4 | |
Inseob Kim | 4eb5660 | 2021-07-09 15:51:12 +0900 | [diff] [blame^] | 5 | allow hwservicemanager vendor_configs_file:file { open getattr }; |
| 6 | |
| 7 | # Note that we do not use the binder_* macros here. |
| 8 | # hwservicemanager provides name service (aka context manager) |
| 9 | # for hwbinder. |
| 10 | # Additionally, it initiates binder IPC calls to |
| 11 | # clients who request service notifications. The permission |
| 12 | # to do this is granted in the hwbinder_use macro. |
| 13 | allow hwservicemanager self:binder set_context_mgr; |
| 14 | |
| 15 | # Scan through /system/lib64/hw looking for installed HALs |
| 16 | allow hwservicemanager system_file:dir r_dir_perms; |
| 17 | |
| 18 | # Read hwservice_contexts |
| 19 | allow hwservicemanager hwservice_contexts_file:file r_file_perms; |
| 20 | |
| 21 | # Check SELinux permissions. |
| 22 | selinux_check_access(hwservicemanager) |
| 23 | |
Inseob Kim | ff43be2 | 2021-06-07 16:56:56 +0900 | [diff] [blame] | 24 | add_hwservice(hwservicemanager, hidl_manager_hwservice) |
| 25 | add_hwservice(hwservicemanager, hidl_token_hwservice) |