16fe52c90c
One time executables. recovery_refresh can be used at any time to ensure recovery logs in pmsg are re-placed at the end of the FIFO. recovery_persist takes the recovery logs in pmsg and drops them into /data/misc/recovery/ directory. Bug: 27176738 Change-Id: Ife3cf323930fb7a6a5d1704667961f9d42bfc5ac
31 lines
1 KiB
Text
31 lines
1 KiB
Text
# android recovery persistent log manager
|
|
type recovery_persist, domain;
|
|
type recovery_persist_exec, exec_type, file_type;
|
|
|
|
init_daemon_domain(recovery_persist)
|
|
|
|
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;
|
|
|
|
###
|
|
### 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.
|
|
neverallow recovery_persist system_file:dir_file_class_set write;
|
|
|
|
# Write to files in /data/data
|
|
neverallow recovery_persist { app_data_file system_data_file }:dir_file_class_set write;
|
|
|
|
# recovery_persist is not allowed to write anywhere other than recovery_data_file
|
|
neverallow recovery_persist { file_type -recovery_data_file -recovery_persist_tmpfs userdebug_or_eng(`-coredump_file') }:file write;
|