summaryrefslogtreecommitdiff
path: root/sepolicy/netmgrd.te
blob: 79af13d91bba5c7d8329b51ad165302987806afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Network utilities (radio process)
type netmgrd, domain, domain_deprecated;
type netmgrd_exec, exec_type, file_type;

# Started by init
init_daemon_domain(netmgrd)

# Uses network sockets.
net_domain(netmgrd)

# Starts as (root,radio) changes to (radio,radio)
allow netmgrd self:capability { setuid setgid net_admin net_raw };

# Triggers a sys_module denial, but kernel has CONFIG_MODULES=n.
dontaudit netmgrd self:capability sys_module;

allow netmgrd self:netlink_socket create_socket_perms;
allow netmgrd self:netlink_route_socket nlmsg_write;

# Talk to qmuxd (qmux_radio)
qmux_socket(netmgrd)

# Runs commands via sh.
# TODO:  Convert to direct exec of /system/bin/ip and any other helpers.
allow netmgrd shell_exec:file rx_file_perms;

# Runs /system/bin/ip addr flush dev <device> commands.
allow netmgrd system_file:file rx_file_perms;

# XXX Run toolbox.  Might not be needed.
allow netmgrd toolbox_exec:file rx_file_perms;
auditallow netmgrd toolbox_exec:file rx_file_perms;

# Set net.rmnet0.* values
set_prop(netmgrd, radio_prop)
auditallow netmgrd radio_prop:property_service set;
set_prop(netmgrd, net_radio_prop)

# Access to /proc/sys/net/*
allow netmgrd proc_net:file rw_file_perms;
allow netmgrd proc_net:dir r_dir_perms;