blob: bc7778fabd31452a44f5279a22ddf78406022a93 [file] [log] [blame]
# Network utilities (radio process)
type netmgrd, domain;
type netmgrd_exec, exec_type, file_type;
# Uses network sockets.
net_domain(netmgrd)
# Talk to qmuxd (qmux_radio)
qmux_socket(netmgrd)
# Runs commands via sh.
allow netmgrd shell_exec:file rx_file_perms;
# Starts as (root,radio) changes to (radio,radio)
allow netmgrd self:capability { setuid setgid net_admin net_raw setpcap };
# Started by init
init_daemon_domain(netmgrd)
allow netmgrd shared_log_device:chr_file rw_file_perms;
# Access to /proc/sys/net/*
allow netmgrd proc_net:file rw_file_perms;
allow netmgrd proc_net:dir r_dir_perms;
# Runs /system/bin/toolbox
allow netmgrd system_file:file rx_file_perms;
allow netmgrd self:netlink_socket create_socket_perms;
allow netmgrd self:netlink_route_socket nlmsg_write;
allow netmgrd self:netlink_xfrm_socket create_socket_perms;
# b/17065650
allow netmgrd self:socket {create ioctl read write};
# CONFIG_MODULES not set in shamu_defconfig
dontaudit netmgrd self:capability sys_module;
# Set net_radio properties
unix_socket_connect(netmgrd, property, init)
allow netmgrd net_radio_prop:property_service set;
# Permission to run netd commands
allow netmgrd netd_socket:sock_file write;
#Allow access to files associated with netd
allow netmgrd net_data_file:file r_file_perms;
allow netmgrd net_data_file:dir r_dir_perms;
#Allow nemtgrd to use esoc api's to determine target
allow netmgrd shell_exec:file { execute r_file_perms execute_no_trans };
#allow netmgrd sysfs_esoc:lnk_file read;
r_dir_file(netmgrd, sysfs_ssr);
#Allow communication with netd
#allow netmgrd wpa_exec:file rx_file_perms;
#allow netmgrd { wcnss_service_exec wpa_exec }:file rx_file_perms;
allow netmgrd sysfs:file write;
allow netmgrd kernel:system module_request;