2012-01-04 18:33:27 +01:00
|
|
|
# servicemanager - the Binder context manager
|
2016-11-26 02:37:30 +01:00
|
|
|
type servicemanager, domain, mlstrustedsubject;
|
2018-09-27 19:21:37 +02:00
|
|
|
type servicemanager_exec, system_file_type, exec_type, file_type;
|
2012-01-04 18:33:27 +01:00
|
|
|
|
2013-10-29 19:42:39 +01:00
|
|
|
# Note that we do not use the binder_* macros here.
|
|
|
|
# servicemanager is unique in that it only provides
|
|
|
|
# name service (aka context manager) for Binder.
|
|
|
|
# As such, it only ever receives and transfers other references
|
|
|
|
# created by other domains. It never passes its own references
|
|
|
|
# or initiates a Binder IPC.
|
|
|
|
allow servicemanager self:binder set_context_mgr;
|
2017-04-25 18:27:54 +02:00
|
|
|
allow servicemanager {
|
|
|
|
domain
|
|
|
|
-init
|
2018-02-09 20:31:56 +01:00
|
|
|
-vendor_init
|
2017-04-25 18:27:54 +02:00
|
|
|
-hwservicemanager
|
|
|
|
-vndservicemanager
|
|
|
|
}:binder transfer;
|
2014-06-06 00:52:02 +02:00
|
|
|
|
2017-03-24 20:24:43 +01:00
|
|
|
allow servicemanager service_contexts_file:file r_file_perms;
|
2020-06-12 10:25:41 +02:00
|
|
|
|
|
|
|
allow servicemanager vendor_service_contexts_file:file r_file_perms;
|
|
|
|
|
2017-09-26 21:58:29 +02:00
|
|
|
# nonplat_service_contexts only accessible on non full-treble devices
|
2021-11-05 15:07:57 +01:00
|
|
|
not_full_treble(`allow servicemanager vendor_service_contexts_file:file r_file_perms;')
|
2016-09-10 01:27:17 +02:00
|
|
|
|
2019-10-17 01:30:26 +02:00
|
|
|
add_service(servicemanager, service_manager_service)
|
2020-05-08 23:28:54 +02:00
|
|
|
allow servicemanager dumpstate:fd use;
|
|
|
|
allow servicemanager dumpstate:fifo_file write;
|
2019-10-17 01:30:26 +02:00
|
|
|
|
2014-06-06 00:52:02 +02:00
|
|
|
# Check SELinux permissions.
|
|
|
|
selinux_check_access(servicemanager)
|
2021-11-13 09:07:46 +01:00
|
|
|
|
|
|
|
recovery_only(`
|
2021-12-07 23:31:04 +01:00
|
|
|
# In recovery, log to kmsg.
|
2021-11-13 09:07:46 +01:00
|
|
|
allow servicemanager kmsg_device:chr_file rw_file_perms;
|
2021-12-07 23:31:04 +01:00
|
|
|
|
|
|
|
# Read VINTF files.
|
|
|
|
r_dir_file(servicemanager, rootfs)
|
2021-11-13 09:07:46 +01:00
|
|
|
')
|