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 19 # set net.rmnet* properties. 20 unix_socket_connect(netmgrd, property, init) 21 allow netmgrd radio_prop:property_service set; 22 auditallow netmgrd radio_prop:property_service set; 23 allow netmgrd net_radio_prop:property_service set; 24 25 # Talk to qmuxd (qmux_radio) 26 qmux_socket(netmgrd) 27 28 # Runs commands via sh. 29 # TODO: Convert to direct exec of /system/bin/ip and any other helpers. 30 allow netmgrd shell_exec:file rx_file_perms; 31 32 # Runs /system/bin/ip addr flush dev <device> commands. 33 allow netmgrd system_file:file rx_file_perms; 34