xref: /aosp_15_r20/system/sepolicy/private/hal_telephony.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker# HwBinder IPC from client to server, and callbacks
2*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_telephony_client, hal_telephony_server)
3*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_telephony_server, hal_telephony_client)
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Workerhal_attribute_hwservice(hal_telephony, hal_telephony_hwservice)
6*e4a36f41SAndroid Build Coastguard Workerhal_attribute_service(hal_telephony, hal_radio_service)
7*e4a36f41SAndroid Build Coastguard Worker
8*e4a36f41SAndroid Build Coastguard Workerallowxperm hal_telephony_server self:udp_socket ioctl priv_sock_ioctls;
9*e4a36f41SAndroid Build Coastguard Worker
10*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:netlink_route_socket nlmsg_write;
11*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:global_capability_class_set { setpcap setgid setuid net_admin net_raw };
12*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server cgroup:dir create_dir_perms;
13*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server cgroup:{ file lnk_file } r_file_perms;
14*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server cgroup_v2:dir create_dir_perms;
15*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server cgroup_v2:{ file lnk_file } r_file_perms;
16*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server radio_device:chr_file rw_file_perms;
17*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server radio_device:blk_file r_file_perms;
18*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server efs_file:dir create_dir_perms;
19*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server efs_file:file create_file_perms;
20*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server vendor_shell_exec:file rx_file_perms;
21*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server bluetooth_efs_file:file r_file_perms;
22*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server bluetooth_efs_file:dir r_dir_perms;
23*e4a36f41SAndroid Build Coastguard Worker
24*e4a36f41SAndroid Build Coastguard Worker# property service
25*e4a36f41SAndroid Build Coastguard Workerget_prop(hal_telephony_server, telephony_config_prop)
26*e4a36f41SAndroid Build Coastguard Workerset_prop(hal_telephony_server, radio_control_prop)
27*e4a36f41SAndroid Build Coastguard Workerset_prop(hal_telephony_server, radio_prop)
28*e4a36f41SAndroid Build Coastguard Workerset_prop(hal_telephony_server, telephony_status_prop)
29*e4a36f41SAndroid Build Coastguard Worker
30*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server tty_device:chr_file rw_file_perms;
31*e4a36f41SAndroid Build Coastguard Worker
32*e4a36f41SAndroid Build Coastguard Worker# Allow hal_telephony_server to create and use netlink sockets.
33*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:netlink_socket create_socket_perms_no_ioctl;
34*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:netlink_generic_socket create_socket_perms_no_ioctl;
35*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
36*e4a36f41SAndroid Build Coastguard Worker
37*e4a36f41SAndroid Build Coastguard Worker# Access to wake locks
38*e4a36f41SAndroid Build Coastguard Workerwakelock_use(hal_telephony_server)
39*e4a36f41SAndroid Build Coastguard Worker
40*e4a36f41SAndroid Build Coastguard Workerr_dir_file(hal_telephony_server, proc_net_type)
41*e4a36f41SAndroid Build Coastguard Workerr_dir_file(hal_telephony_server, sysfs_type)
42*e4a36f41SAndroid Build Coastguard Worker
43*e4a36f41SAndroid Build Coastguard Worker# granting the ioctl permission for hal_telephony_server should be device specific
44*e4a36f41SAndroid Build Coastguard Workerallow hal_telephony_server self:socket create_socket_perms_no_ioctl;
45*e4a36f41SAndroid Build Coastguard Worker
46*e4a36f41SAndroid Build Coastguard Worker# Allow AIDL HAL shim to call HIDL HAL implementation
47*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_telephony_server, hal_telephony_server)
48