1 # Network utilities (radio process) 2 type netmgrd, domain, domain_deprecated; 3 type netmgrd_exec, exec_type, file_type; 4 5 # Started by init 6 init_daemon_domain(netmgrd) 7 8 net_domain(netmgrd) 9 allow netmgrd self:capability { setuid setgid net_admin net_raw }; 10 dontaudit netmgrd self:capability setpcap; 11 12 set_prop(netmgrd, net_radio_prop) 13 14 allow netmgrd self:netlink_socket create_socket_perms; 15 allow netmgrd self:netlink_route_socket nlmsg_write; 16 allow netmgrd self:netlink_xfrm_socket { create_socket_perms nlmsg_write nlmsg_read}; 17 allow netmgrd self:socket create_socket_perms; 18 allow netmgrd netd_socket:sock_file w_file_perms; 19 allow netmgrd net_data_file:dir r_dir_perms; 20 allow netmgrd net_data_file:file r_file_perms; 21 22 allow netmgrd shell_exec:file rx_file_perms; 23 allow netmgrd system_file:file rx_file_perms; 24 25 allow netmgrd sysfs_msm_subsys:dir r_dir_perms; 26 allow netmgrd sysfs_msm_subsys:lnk_file r_file_perms; 27 28 # Access to /proc/sys/net/* 29 allow netmgrd proc_net:file rw_file_perms; 30 allow netmgrd proc_net:dir r_dir_perms; 31 32 qmux_socket(netmgrd) 33 34 userdebug_or_eng(` 35 allow netmgrd shared_log_device:chr_file rw_file_perms; 36 allow netmgrd diag_device:chr_file rw_file_perms; 37 ') 38 39 # execute toybox/toolbox 40 allow netmgrd toolbox_exec:file rx_file_perms; 41 42 #Allow netmgrd to use wakelock 43 wakelock_use(netmgrd) 44