Home | History | Annotate | Download | only in sepolicy
      1 # Network utilities (radio process)
      2 type netmgrd, domain;
      3 type netmgrd_exec, exec_type, file_type;
      4 
      5 # Started by init
      6 init_daemon_domain(netmgrd)
      7 
      8 # Starts as (root,radio) changes to (radio,radio)
      9 allow netmgrd self:capability { setuid setgid net_admin net_raw };
     10 
     11 # Support modprobe??
     12 dontaudit netmgrd self:capability sys_module;
     13 
     14 allow netmgrd self:udp_socket { create ioctl };
     15 allow netmgrd self:netlink_socket create_socket_perms;
     16 allow netmgrd self:netlink_route_socket { create_socket_perms nlmsg_read nlmsg_write };
     17 allow netmgrd self:packet_socket create_socket_perms;
     18 allow netmgrd self:rawip_socket create_socket_perms;
     19 
     20 # Talk to qmuxd (qmux_radio)
     21 qmux_socket(netmgrd)
     22 
     23 # Runs commands via sh.
     24 # TODO:  Convert to direct exec of /system/bin/ip and any other helpers.
     25 allow netmgrd shell_exec:file rx_file_perms;
     26 
     27 # Runs /system/bin/ip addr flush dev <device> commands.
     28 allow netmgrd system_file:file rx_file_perms;
     29 
     30 # set net.rmnet* properties.
     31 unix_socket_connect(netmgrd, property, init)
     32 allow netmgrd radio_prop:property_service set;
     33 auditallow netmgrd radio_prop:property_service set;
     34 allow netmgrd net_radio_prop:property_service set;
     35