Merge "sepolicy: add rules to access sensors power scripts from app"

This commit is contained in:
qctecmdr Service 2019-02-25 05:05:24 -08:00 committed by Gerrit - the friendly Code Review server
commit 69a2b0fbae
3 changed files with 8 additions and 0 deletions

View file

@ -33,3 +33,6 @@ type sysfs_kgsl_snapshot, sysfs_type, fs_type;
# path to debugfs. use this only in debug builds
type qti_debugfs, fs_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

@ -78,6 +78,8 @@
/(vendor|system/vendor)/bin/test-fdal u:object_r:location_exec:s0
/(vendor|system/vendor)/bin/sns.* u:object_r:sensors_test_exec:s0
# Sensors scripts for test app
/data/sensors/scripts(/.*)? u:object_r:sensors_data_file:s0
#for testscripts support
/(vendor|system/vendor)/bin/init\.qcom\.vendor\.testscripts\.sh u:object_r:vendor-qti-testscripts_exec:s0
#TODO: coredump_file need have a attribute of data_file_type and

View file

@ -52,3 +52,6 @@ allow usta_app {
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 sensors_data_file:dir create_dir_perms;
allow usta_app sensors_data_file:file create_file_perms;