hal_telephony.te 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # HwBinder IPC from client to server, and callbacks
  2. binder_call(hal_telephony_client, hal_telephony_server)
  3. binder_call(hal_telephony_server, hal_telephony_client)
  4. hal_attribute_hwservice(hal_telephony, hal_telephony_hwservice)
  5. allowxperm hal_telephony_server self:udp_socket ioctl priv_sock_ioctls;
  6. allow hal_telephony_server self:netlink_route_socket nlmsg_write;
  7. allow hal_telephony_server kernel:system module_request;
  8. allow hal_telephony_server self:global_capability_class_set { setpcap setgid setuid net_admin net_raw };
  9. allow hal_telephony_server cgroup:dir create_dir_perms;
  10. allow hal_telephony_server cgroup:{ file lnk_file } r_file_perms;
  11. allow hal_telephony_server radio_device:chr_file rw_file_perms;
  12. allow hal_telephony_server radio_device:blk_file r_file_perms;
  13. allow hal_telephony_server efs_file:dir create_dir_perms;
  14. allow hal_telephony_server efs_file:file create_file_perms;
  15. allow hal_telephony_server vendor_shell_exec:file rx_file_perms;
  16. allow hal_telephony_server bluetooth_efs_file:file r_file_perms;
  17. allow hal_telephony_server bluetooth_efs_file:dir r_dir_perms;
  18. # property service
  19. set_prop(hal_telephony_server, radio_prop)
  20. set_prop(hal_telephony_server, exported_radio_prop)
  21. set_prop(hal_telephony_server, exported2_radio_prop)
  22. set_prop(hal_telephony_server, exported3_radio_prop)
  23. allow hal_telephony_server tty_device:chr_file rw_file_perms;
  24. # Allow hal_telephony_server to create and use netlink sockets.
  25. allow hal_telephony_server self:netlink_socket create_socket_perms_no_ioctl;
  26. allow hal_telephony_server self:netlink_generic_socket create_socket_perms_no_ioctl;
  27. allow hal_telephony_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
  28. # Access to wake locks
  29. wakelock_use(hal_telephony_server)
  30. r_dir_file(hal_telephony_server, proc_net_type)
  31. r_dir_file(hal_telephony_server, sysfs_type)
  32. # granting the ioctl permission for hal_telephony_server should be device specific
  33. allow hal_telephony_server self:socket create_socket_perms_no_ioctl;