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# Triggers a sys_module denial, but kernel has CONFIG_MODULES=n.
9dontaudit netmgrd self:capability sys_module;
10
11# Starts as (root,radio) changes to (radio,radio)
12allow netmgrd self:capability { setuid setgid net_admin net_raw };
13
14allow netmgrd self:udp_socket { create ioctl };
15# rawip_socket for iptables
16allow netmgrd self:rawip_socket create_socket_perms;
17allow netmgrd self:netlink_socket create_socket_perms;
18allow netmgrd self:netlink_route_socket { create_socket_perms nlmsg_write nlmsg_read };
19
20# Talk to qmuxd (qmux_radio)
21qmux_socket(netmgrd)
22
23# Runs commands via sh.
24allow netmgrd shell_exec:file rx_file_perms;
25
26# Runs /system/bin/ip addr flush dev <device> commands.
27allow netmgrd system_file:file rx_file_perms;
28
29# Talk to init over the property socket
30unix_socket_connect(netmgrd, property, init)
31# Set net.rmnet0.* values
32allow netmgrd radio_prop:property_service set;
33auditallow netmgrd radio_prop:property_service set;
34allow netmgrd net_radio_prop:property_service set;
35
36# Access to /proc/sys/net/*
37allow netmgrd proc_net:file rw_file_perms;
38allow netmgrd proc_net:dir r_dir_perms;
39
40# Let netmgrd access /dev/mdm node (modem driver)
41allow netmgrd radio_device:chr_file r_file_perms;
42