tzdatacheck.te 1.0 KB

123456789101112131415161718
  1. # The tzdatacheck command run by init.
  2. type tzdatacheck, domain;
  3. type tzdatacheck_exec, system_file_type, exec_type, file_type;
  4. allow tzdatacheck zoneinfo_data_file:dir create_dir_perms;
  5. allow tzdatacheck zoneinfo_data_file:file unlink;
  6. # Below are strong assertion that only init, system_server and tzdatacheck
  7. # can modify the /data time zone rules directories. This is to make it very
  8. # clear that only these domains should modify the actual time zone rules data.
  9. # The tzdatacheck binary itself may be executed by shell for tests but it must
  10. # not be able to modify the real rules.
  11. # If other users / binaries could modify time zone rules on device this might
  12. # have negative implications for users (who may get incorrect local times)
  13. # or break assumptions made / invalidate data held by the components actually
  14. # responsible for updating time zone rules.
  15. neverallow { domain -system_server -init -tzdatacheck } zoneinfo_data_file:file no_w_file_perms;
  16. neverallow { domain -system_server -init -tzdatacheck } zoneinfo_data_file:dir no_w_dir_perms;