Inseob Kim | ff43be2 | 2021-06-07 16:56:56 +0900 | [diff] [blame^] | 1 | # hwservicemanager - the Binder context manager for HAL services |
| 2 | type hwservicemanager, domain, mlstrustedsubject; |
| 3 | type hwservicemanager_exec, system_file_type, exec_type, file_type; |
| 4 | |
| 5 | # Note that we do not use the binder_* macros here. |
| 6 | # hwservicemanager provides name service (aka context manager) |
| 7 | # for hwbinder. |
| 8 | # Additionally, it initiates binder IPC calls to |
| 9 | # clients who request service notifications. The permission |
| 10 | # to do this is granted in the hwbinder_use macro. |
| 11 | allow hwservicemanager self:binder set_context_mgr; |
| 12 | |
| 13 | # Scan through /system/lib64/hw looking for installed HALs |
| 14 | allow hwservicemanager system_file:dir r_dir_perms; |
| 15 | |
| 16 | # Read hwservice_contexts |
| 17 | allow hwservicemanager hwservice_contexts_file:file r_file_perms; |
| 18 | |
| 19 | # Check SELinux permissions. |
| 20 | selinux_check_access(hwservicemanager) |