1# Network utilities (radio process) 2type netmgrd, domain; 3type netmgrd_exec, exec_type, file_type; 4 5# Started by init 6init_daemon_domain(netmgrd) 7 8# Uses network sockets. 9net_domain(netmgrd) 10 11# Starts as (root,radio) changes to (radio,radio) 12allow netmgrd self:capability { setuid setgid net_admin net_raw }; 13 14# Triggers a sys_module denial, but kernel has CONFIG_MODULES=n. 15dontaudit netmgrd self:capability sys_module; 16 17allow netmgrd self:netlink_socket create_socket_perms; 18allow netmgrd self:netlink_route_socket nlmsg_write; 19 20# Talk to qmuxd (qmux_radio) 21qmux_socket(netmgrd) 22 23# Runs commands via sh. 24# TODO: Convert to direct exec of /system/bin/ip and any other helpers. 25allow netmgrd shell_exec:file rx_file_perms; 26 27# Runs /system/bin/ip addr flush dev <device> commands. 28allow netmgrd system_file:file rx_file_perms; 29 30# Talk to init over the property socket 31unix_socket_connect(netmgrd, property, init) 32# Set net.rmnet0.* values 33allow netmgrd radio_prop:property_service set; 34auditallow netmgrd radio_prop:property_service set; 35allow netmgrd net_radio_prop:property_service set; 36 37# Access to /proc/sys/net/* 38allow netmgrd proc_net:file rw_file_perms; 39allow netmgrd proc_net:dir r_dir_perms; 40