cameraservice: Add selinux policy for vndk cameraservice.

This CL adds a new cameraservice type to allow vendor clients of
cameraservice to query and find the stable cameraservice
implementation.

Bug: 243593375
Test: Manually tested that cameraservice can register a vendor facing
      instance.
Change-Id: I61499406d4811c898719abcb89c51b4b8a29f4a7
This commit is contained in:
Avichal Rakesh 2022-12-12 15:20:02 -08:00
parent 2ca7ebd8a2
commit 0febfbd952
5 changed files with 5 additions and 0 deletions

View file

@ -118,6 +118,7 @@ var (
"android.hardware.wifi.IWifi/default": EXCEPTION_NO_FUZZER,
"android.hardware.wifi.hostapd.IHostapd/default": EXCEPTION_NO_FUZZER,
"android.hardware.wifi.supplicant.ISupplicant/default": EXCEPTION_NO_FUZZER,
"android.frameworks.cameraservice.service.ICameraService/default": EXCEPTION_NO_FUZZER,
"android.frameworks.sensorservice.ISensorManager/default": []string{"libsensorserviceaidl_fuzzer"},
"android.frameworks.stats.IStats/default": EXCEPTION_NO_FUZZER,
"android.se.omapi.ISecureElementService/default": EXCEPTION_NO_FUZZER,

View file

@ -12,6 +12,7 @@
device_config_memory_safety_native_prop
device_config_vendor_system_native_prop
devicelock_service
fwk_camera_service
fwk_sensor_service
hal_bootctl_service
hal_cas_service

View file

@ -1,3 +1,4 @@
android.frameworks.cameraservice.service.ICameraService/default u:object_r:fwk_camera_service:s0
android.frameworks.stats.IStats/default u:object_r:fwk_stats_service:s0
android.frameworks.sensorservice.ISensorManager/default u:object_r:fwk_sensor_service:s0
android.hardware.audio.core.IConfig/default u:object_r:hal_audio_service:s0

View file

@ -19,6 +19,7 @@ allow cameraserver dmabuf_system_heap_device:chr_file r_file_perms;
allow cameraserver hal_graphics_composer:fd use;
add_service(cameraserver, cameraserver_service)
add_service(cameraserver, fwk_camera_service)
add_hwservice(cameraserver, fwk_camera_hwservice)
allow cameraserver activity_service:service_manager find;

View file

@ -7,6 +7,7 @@ type authorization_service, service_manager_type;
type batteryproperties_service, app_api_service, ephemeral_app_api_service, service_manager_type;
type bluetooth_service, service_manager_type;
type cameraserver_service, service_manager_type;
type fwk_camera_service, service_manager_type;
type default_android_service, service_manager_type;
type dice_maintenance_service, service_manager_type;
type dice_node_service, service_manager_type;