Merge "Allow hal_face to write to /data/vendor/camera_calibration/*."

This commit is contained in:
Matthias Kramm 2019-06-17 19:31:50 +00:00 committed by Gerrit Code Review
commit 9faeec71f2
5 changed files with 14 additions and 0 deletions

View file

@ -5,6 +5,7 @@
(typeattribute new_objects)
(typeattributeset new_objects
( new_objects
camera_calibration_vendor_data_file
ctl_apexd_prop
device_config_sys_traced_prop
runtime_apex_dir

View file

@ -539,6 +539,9 @@
# Face vendor data file
/data/vendor_de/[0-9]+/facedata(/.*)? u:object_r:face_vendor_data_file:s0
# Directory for (auto)calibration file(s)
/data/vendor/camera_calibration(/.*)? u:object_r:camera_calibration_vendor_data_file:s0
# Iris vendor data file
/data/vendor_de/[0-9]+/irisdata(/.*)? u:object_r:iris_vendor_data_file:s0

View file

@ -406,6 +406,8 @@ type app_fuse_file, file_type, data_file_type, core_data_file_type, mlstrustedob
type face_vendor_data_file, file_type, data_file_type;
# Type for iris template file
type iris_vendor_data_file, file_type, data_file_type;
# Type for calibration template file
type camera_calibration_vendor_data_file, file_type, data_file_type;
# Socket types
type adbd_socket, file_type, coredomain_socket;

View file

@ -10,3 +10,7 @@ allow hal_face ion_device:chr_file r_file_perms;
# Allow read/write access to the face template directory.
allow hal_face face_vendor_data_file:file create_file_perms;
allow hal_face face_vendor_data_file:dir rw_dir_perms;
# Allow writing new camera calibrations
allow hal_face camera_calibration_vendor_data_file:dir rw_dir_perms;
allow hal_face camera_calibration_vendor_data_file:file create_file_perms;

View file

@ -9,3 +9,7 @@ allow hal_camera_default fwk_sensor_hwservice:hwservice_manager find;
# For collecting bugreports.
allow hal_camera_default dumpstate:fd use;
allow hal_camera_default dumpstate:fifo_file write;
# Allow reading camera calibrations
allow hal_camera_default camera_calibration_vendor_data_file:dir search;
allow hal_camera_default camera_calibration_vendor_data_file:file r_file_perms;