2016-03-16 16:11:49 +01:00
|
|
|
# android recovery persistent log manager
|
|
|
|
type recovery_persist, domain;
|
2018-09-27 19:21:37 +02:00
|
|
|
type recovery_persist_exec, system_file_type, exec_type, file_type;
|
2016-03-16 16:11:49 +01:00
|
|
|
|
|
|
|
allow recovery_persist pstorefs:dir search;
|
|
|
|
allow recovery_persist pstorefs:file r_file_perms;
|
|
|
|
|
|
|
|
allow recovery_persist recovery_data_file:file create_file_perms;
|
|
|
|
allow recovery_persist recovery_data_file:dir create_dir_perms;
|
|
|
|
|
2018-09-07 02:15:16 +02:00
|
|
|
allow recovery_persist cache_file:dir search;
|
|
|
|
allow recovery_persist cache_file:lnk_file read;
|
|
|
|
allow recovery_persist cache_recovery_file:dir rw_dir_perms;
|
|
|
|
allow recovery_persist cache_recovery_file:file { r_file_perms unlink };
|
|
|
|
|
2016-03-16 16:11:49 +01:00
|
|
|
###
|
|
|
|
### Neverallow rules
|
|
|
|
###
|
|
|
|
### recovery_persist should NEVER do any of this
|
|
|
|
|
|
|
|
# Block device access.
|
|
|
|
neverallow recovery_persist dev_type:blk_file { read write };
|
|
|
|
|
|
|
|
# ptrace any other app
|
|
|
|
neverallow recovery_persist domain:process ptrace;
|
|
|
|
|
|
|
|
# Write to /system.
|
2023-05-18 01:44:30 +02:00
|
|
|
neverallow recovery_persist system_file_type:dir_file_class_set write;
|
2016-03-16 16:11:49 +01:00
|
|
|
|
|
|
|
# Write to files in /data/data
|
2023-05-23 01:45:40 +02:00
|
|
|
neverallow recovery_persist { app_data_file_type system_data_file }:dir_file_class_set write;
|
2016-03-16 16:11:49 +01:00
|
|
|
|