1type netmgrd, domain;
2type netmgrd_exec, exec_type, vendor_file_type, file_type;
3
4net_domain(netmgrd)
5init_daemon_domain(netmgrd)
6
7set_prop(netmgrd, vendor_net_radio_prop)
8set_prop(netmgrd, net_rmnet_prop)
9
10allow netmgrd netmgrd_socket:dir w_dir_perms;
11allow netmgrd netmgrd_socket:sock_file create_file_perms;
12allow netmgrd self:netlink_xfrm_socket { create_socket_perms_no_ioctl nlmsg_write };
13allow netmgrd self:netlink_generic_socket create_socket_perms_no_ioctl;
14allow netmgrd self:netlink_route_socket nlmsg_write;
15allow netmgrd self:netlink_socket create_socket_perms_no_ioctl;
16allow netmgrd self:socket create_socket_perms;
17allowxperm netmgrd self:socket ioctl msm_sock_ipc_ioctls;
18allowxperm netmgrd self:udp_socket ioctl priv_sock_ioctls;
19
20allow netmgrd sysfs_net:dir r_dir_perms;
21allow netmgrd sysfs_net:file rw_file_perms;
22allow netmgrd sysfs_soc:dir search;
23allow netmgrd sysfs_soc:file r_file_perms;
24allow netmgrd sysfs_msm_subsys:dir r_dir_perms;
25allow netmgrd sysfs_msm_subsys:file r_file_perms;
26
27r_dir_file(netmgrd, sysfs_msm_subsys)
28
29wakelock_use(netmgrd)
30
31#Allow netutils usage
32domain_auto_trans(netmgrd, netutils_wrapper_exec, netutils_wrapper)
33allow netmgrd netutils_wrapper:process sigkill;
34
35#Allow diag logging
36allow netmgrd sysfs_timestamp_switch:file { read open };
37userdebug_or_eng(`
38  r_dir_file(netmgrd, sysfs_diag)
39  allow netmgrd diag_device:chr_file rw_file_perms;
40')
41dontaudit netmgrd diag_device:chr_file rw_file_perms;
42
43#Ignore if device loading for private IOCTL failed
44dontaudit netmgrd kernel:system { module_request };
45
46allow netmgrd proc_net_type:file rw_file_perms;
47allow netmgrd netmgr_data_file:dir rw_dir_perms;
48allow netmgrd netmgr_data_file:file create_file_perms;
49
50allow netmgrd self:capability { net_admin net_raw setgid setpcap setuid };
51
52allow netmgrd vendor_toolbox_exec:file rx_file_perms;
53
54# Allow netmgrd to use netd HAL
55allow netmgrd system_net_netd_hwservice:hwservice_manager find;
56get_prop(netmgrd, hwservicemanager_prop)
57binder_call(netmgrd, netd)
58hwbinder_use(netmgrd)
59
60dontaudit netmgrd kernel:system module_request;
61dontaudit netmgrd self:system module_request;
62