flags_health_check.te 2.0 KB

12345678910111213141516171819202122232425262728293031
  1. # The flags_health_check command run by init.
  2. type flags_health_check, domain, coredomain;
  3. type flags_health_check_exec, system_file_type, exec_type, file_type;
  4. set_prop(flags_health_check, device_config_boot_count_prop)
  5. set_prop(flags_health_check, device_config_reset_performed_prop)
  6. set_prop(flags_health_check, device_config_runtime_native_boot_prop)
  7. set_prop(flags_health_check, device_config_runtime_native_prop)
  8. set_prop(flags_health_check, device_config_input_native_boot_prop)
  9. set_prop(flags_health_check, device_config_netd_native_prop)
  10. set_prop(flags_health_check, device_config_activity_manager_native_boot_prop)
  11. set_prop(flags_health_check, device_config_media_native_prop)
  12. allow flags_health_check server_configurable_flags_data_file:dir rw_dir_perms;
  13. allow flags_health_check server_configurable_flags_data_file:file create_file_perms;
  14. # system property device_config_boot_count_prop is used for deciding when to perform server
  15. # configurable flags related disaster recovery. Mistakenly set up by unrelated components can, at a
  16. # wrong timing, trigger server configurable flag related disaster recovery, which will override
  17. # server configured values of all flags with default values.
  18. neverallow { domain -init -flags_health_check } device_config_boot_count_prop:property_service set;
  19. # system property device_config_reset_performed_prop is used for indicating whether server
  20. # configurable flags have been reset during booting. Mistakenly modified by unrelated components can
  21. # cause bad server configurable flags synced back to device.
  22. neverallow { domain -init -flags_health_check } device_config_reset_performed_prop:property_service set;
  23. # server_configurable_flags_data_file is used for storing whether server configurable flags which
  24. # have been reset during current booting. Mistakenly modified by unrelated components can
  25. # cause bad server configurable flags synced back to device.
  26. neverallow { domain -init -flags_health_check } server_configurable_flags_data_file:file no_w_file_perms;