Home | History | Annotate | Download | only in public
      1 type wpantund, domain;
      2 type wpantund_exec, exec_type, file_type;
      3 
      4 hal_client_domain(wpantund, hal_lowpan)
      5 net_domain(wpantund)
      6 
      7 binder_use(wpantund)
      8 binder_call(wpantund, system_server)
      9 
     10 # wpantund needs to be able to check in with the lowpan_service
     11 allow 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`.
     18 allow wpantund {priv_app shell}:binder call;
     19 
     20 # create sockets to set interfaces up and down, add multicast groups, etc.
     21 allow wpantund self:udp_socket create_socket_perms;
     22 
     23 # setting interface state up/down and changing MTU are privileged ioctls
     24 allowxperm wpantund self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFMTU };
     25 
     26 # Allow us to bring up a TUN network interface.
     27 allow wpantund tun_device:chr_file rw_file_perms;
     28 allow wpantund self:global_capability_class_set { net_admin net_raw };
     29 allow wpantund self:tun_socket create;
     30