blob: 28e0c7c6bb2e0d2444d2c12c37375b2854921455 [file] [log] [blame]
Dan Cashman91d398d2017-09-26 12:58:29 -07001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_cas_client, hal_cas_server)
3binder_call(hal_cas_server, hal_cas_client)
4
Steven Moreland8fc79812018-05-30 16:43:17 -07005hal_attribute_hwservice_client(hal_cas, hal_cas_hwservice)
Dan Cashman91d398d2017-09-26 12:58:29 -07006allow hal_cas_server hidl_memory_hwservice:hwservice_manager find;
7
8# Permit reading device's serial number from system properties
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -08009get_prop(hal_cas_server, serialno_prop)
Dan Cashman91d398d2017-09-26 12:58:29 -070010
11# Read files already opened under /data
Dan Cashman91d398d2017-09-26 12:58:29 -070012allow hal_cas system_data_file:file { getattr read };
Dan Cashman91d398d2017-09-26 12:58:29 -070013
14# Read access to pseudo filesystems
15r_dir_file(hal_cas, cgroup)
16allow hal_cas cgroup:dir { search write };
17allow hal_cas cgroup:file w_file_perms;
18
19# Allow access to ion memory allocation device
20allow hal_cas ion_device:chr_file rw_file_perms;
21allow hal_cas hal_graphics_allocator:fd use;
22
23allow hal_cas tee_device:chr_file rw_file_perms;
24
25###
26### neverallow rules
27###
28
29# hal_cas should never execute any executable without a
30# domain transition
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080031neverallow hal_cas_server { file_type fs_type }:file execute_no_trans;
Dan Cashman91d398d2017-09-26 12:58:29 -070032
33# do not allow privileged socket ioctl commands
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080034neverallowxperm hal_cas_server domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;