1type wpantund, domain; 2type wpantund_exec, exec_type, file_type; 3 4hal_client_domain(wpantund, hal_lowpan) 5net_domain(wpantund) 6 7binder_use(wpantund) 8binder_call(wpantund, system_server) 9 10# wpantund needs to be able to check in with the lowpan_service 11allow wpantund lowpan_service:service_manager find; 12 13# Allow wpantund to call any callbacks that have been registered with it. 14# Generally, only privileged apps are able to register callbacks with 15# wpantund, so we are limiting the scope for callbacks to only privileged 16# apps. We also add shell to allow the command-line utility `lowpanctl` 17# to work properly from `adb shell`. 18allow wpantund {priv_app shell}:binder call; 19 20# create sockets to set interfaces up and down, add multicast groups, etc. 21allow wpantund self:udp_socket create_socket_perms; 22 23# setting interface state up/down and changing MTU are privileged ioctls 24allowxperm wpantund self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFMTU }; 25 26# Allow us to bring up a TUN network interface. 27allow wpantund tun_device:chr_file rw_file_perms; 28allow wpantund self:global_capability_class_set { net_admin net_raw }; 29allow wpantund self:tun_socket create; 30