sepolicy: Allow USTA test app to access /data/sensors/scripts for legacy path.

Change-Id: I2526ac36b4b1f55b2aa11bb34350ef14ba306290
This commit is contained in:
Vivek Arugula 2019-06-28 11:55:37 +05:30
parent 27b6cae070
commit c3013804e9
3 changed files with 8 additions and 0 deletions

View file

@ -34,3 +34,6 @@ type system_gles_data_file, core_data_file_type, file_type, data_file_type;
# /sys/kernel/debug/binder/state file # /sys/kernel/debug/binder/state file
# read by system_server only in userdebug builds # read by system_server only in userdebug builds
type binder_state, file_type, debugfs_type; type binder_state, file_type, debugfs_type;
# sensors data file type for script access by test apps
type sensors_data_file, file_type, data_file_type, core_data_file_type;

View file

@ -102,3 +102,6 @@
/data/misc/gpu(/.*)? u:object_r:system_gles_data_file:s0 /data/misc/gpu(/.*)? u:object_r:system_gles_data_file:s0
/sys/kernel/debug/binder/state u:object_r:binder_state:s0 /sys/kernel/debug/binder/state u:object_r:binder_state:s0
# Sensors scripts for test app
/data/sensors/scripts(/.*)? u:object_r:sensors_data_file:s0

View file

@ -50,6 +50,8 @@ allow usta_app {
allow usta_app system_app_data_file:dir create_dir_perms; allow usta_app system_app_data_file:dir create_dir_perms;
allow usta_app system_app_data_file:file create_file_perms; allow usta_app system_app_data_file:file create_file_perms;
allow usta_app sensors_data_file:dir create_dir_perms;
allow usta_app sensors_data_file:file create_file_perms;
allow usta_app sensors_persist_file:dir create_dir_perms; allow usta_app sensors_persist_file:dir create_dir_perms;
allow usta_app sensors_persist_file:file create_file_perms; allow usta_app sensors_persist_file:file create_file_perms;
allow usta_app mnt_vendor_file:dir create_dir_perms; allow usta_app mnt_vendor_file:dir create_dir_perms;