xref: /aosp_15_r20/system/sepolicy/private/recovery_refresh.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1typeattribute recovery_refresh coredomain;
2
3init_daemon_domain(recovery_refresh)
4
5allow recovery_refresh pstorefs:dir search;
6allow recovery_refresh pstorefs:file r_file_perms;
7# NB: domain inherits write_logd which hands us write to pmsg_device
8
9###
10### Neverallow rules
11###
12### recovery_refresh should NEVER do any of this
13
14# Block device access.
15neverallow recovery_refresh dev_type:blk_file { read write };
16
17# ptrace any other app
18neverallow recovery_refresh domain:process ptrace;
19
20# Write to /system.
21neverallow recovery_refresh system_file_type:dir_file_class_set write;
22
23# Write to files in /data/data or system files on /data
24neverallow recovery_refresh { app_data_file_type system_data_file }:dir_file_class_set write;
25
26# recovery_refresh is not allowed to write anywhere
27neverallow recovery_refresh {
28  file_type
29  userdebug_or_eng(`-coredump_file')
30  with_native_coverage(`-method_trace_data_file')
31}:file write;
32