hal_cas.te 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # HwBinder IPC from client to server, and callbacks
  2. binder_call(hal_cas_client, hal_cas_server)
  3. binder_call(hal_cas_server, hal_cas_client)
  4. hal_attribute_hwservice(hal_cas, hal_cas_hwservice)
  5. allow hal_cas_server hidl_memory_hwservice:hwservice_manager find;
  6. # Permit reading device's serial number from system properties
  7. get_prop(hal_cas_server, serialno_prop)
  8. # Read files already opened under /data
  9. allow hal_cas system_data_file:file { getattr read };
  10. # Read access to pseudo filesystems
  11. r_dir_file(hal_cas, cgroup)
  12. allow hal_cas cgroup:dir { search write };
  13. allow hal_cas cgroup:file w_file_perms;
  14. # Allow access to ion memory allocation device
  15. allow hal_cas ion_device:chr_file rw_file_perms;
  16. allow hal_cas hal_graphics_allocator:fd use;
  17. allow hal_cas tee_device:chr_file rw_file_perms;
  18. ###
  19. ### neverallow rules
  20. ###
  21. # hal_cas should never execute any executable without a
  22. # domain transition
  23. neverallow hal_cas_server { file_type fs_type }:file execute_no_trans;
  24. # do not allow privileged socket ioctl commands
  25. neverallowxperm hal_cas_server domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;