art_apex_boot_integrity.te 1.2 KB

12345678910111213141516171819202122232425262728
  1. # This command set checks the integrity of boot classpath ART
  2. # artifacts in /data, potentially removing them.
  3. type art_apex_boot_integrity, domain, coredomain;
  4. type art_apex_boot_integrity_exec, system_file_type, exec_type, file_type;
  5. # Technically not a daemon but we do want the transition from init domain to
  6. # art_apex_boot_integrity to occur.
  7. init_daemon_domain(art_apex_boot_integrity)
  8. # Read dalvik cache directories, remove entries.
  9. allow art_apex_boot_integrity dalvikcache_data_file:dir { r_dir_perms write remove_name };
  10. # Read and possibly delete dalvik cache files.
  11. allow art_apex_boot_integrity dalvikcache_data_file:file { r_file_perms unlink };
  12. # Allow art_apex_boot_integrity to execute itself using #!/system/bin/sh
  13. allow art_apex_boot_integrity shell_exec:file rx_file_perms;
  14. # Allow running the mv and rm/rmdir commands using art_apex_boot_integrity
  15. # permissions.
  16. allow art_apex_boot_integrity toolbox_exec:file rx_file_perms;
  17. # Fsverity in the same domain.
  18. allow art_apex_boot_integrity system_file:file execute_no_trans;
  19. # Fsverity work.
  20. allowxperm art_apex_boot_integrity dalvikcache_data_file:file ioctl {
  21. FS_IOC_ENABLE_VERITY FS_IOC_MEASURE_VERITY
  22. };