Merge "bootstat: Implement the SELinux policy to allow reading/writing to /data/misc/bootstat."

This commit is contained in:
James Hawkins 2016-01-22 18:05:25 +00:00 committed by Gerrit Code Review
commit 447041a940
3 changed files with 11 additions and 0 deletions

9
bootstat.te Normal file
View File

@ -0,0 +1,9 @@
# bootstat command
type bootstat, domain;
type bootstat_exec, exec_type, file_type;
init_daemon_domain(bootstat)
# Allow persistent storage in /data/misc/bootstat.
allow bootstat bootstat_data_file:dir rw_dir_perms;
allow bootstat bootstat_data_file:file create_file_perms;

View File

@ -111,6 +111,7 @@ type storage_stub_file, file_type;
type adb_keys_file, file_type, data_file_type;
type audio_data_file, file_type, data_file_type;
type bluetooth_data_file, file_type, data_file_type;
type bootstat_data_file, file_type, data_file_type;
type boottrace_data_file, file_type, data_file_type;
type camera_data_file, file_type, data_file_type;
type gatekeeper_data_file, file_type, data_file_type;

View File

@ -251,6 +251,7 @@
# Misc data
/data/misc/adb(/.*)? u:object_r:adb_keys_file:s0
/data/misc/audio(/.*)? u:object_r:audio_data_file:s0
/data/misc/bootstat(/.*)? u:object_r:bootstat_data_file:s0
/data/misc/boottrace(/.*)? u:object_r:boottrace_data_file:s0
/data/misc/bluetooth(/.*)? u:object_r:bluetooth_data_file:s0
/data/misc/bluedroid(/.*)? u:object_r:bluetooth_data_file:s0