harmony 鸿蒙Configuring an OpenHarmony SELinux Policy for an SA or HDF Service
Configuring an OpenHarmony SELinux Policy for an SA or HDF Service
SA
Scenario
After a process registers an SA with Samgr, other processes need to obtain the SA before starting IPC with the process. If the SA provider does not assign an SELinux label for the SA, SELinux will assign the u:object_r:default_service:s0 label to the SA. The access to default_service will be denied by the neverallow rule.
Procedure
In the service_contexts file, add the mapping between the SAID and the SA label.
10 u:object_r:sa_render_service:s0
In the type.te file, add the type, for example, isa_render_service, to make the label valid.
type sa_render_service, sa_service_attr
HDF Service
Scenario
After a process registers an HDF service with hdf_devmgr, other processes need to obtain the HDF service before starting IPC with the process. If the HDF provider does not assign an SELinux label for the HDF service, SELinux will assign the u:object_r:hdf_default_service:s0 label for the HDF service. The access to hdf_default_service will be denied by the neverallow rule.
Procedure
In the service_contexts file, add the mapping between the HDF service name and the HDF label.
thermal_interface_service u:object_r:hdf_thermal_interface_service:s0
In the type.te file, add the type, for example, hdf_thermal_interface_service, to make the label valid.
type hdf_thermal_interface_service, hdf_service_attr
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AI Framework Development Guide
harmony 鸿蒙Neural Network Runtime Device Access
harmony 鸿蒙Application Privilege Configuration
harmony 鸿蒙Setting Up a Development Environment
harmony 鸿蒙Development Guidelines
harmony 鸿蒙Application Framework Overview
harmony 鸿蒙ArkCompiler Development
harmony 鸿蒙Window Title Bar Customization Development (ArkTS)
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦