Home | History | Annotate | Download | only in sepolicy
      1 # Network utilities (radio process)
      2 type netmgrd, domain, domain_deprecated;
      3 type netmgrd_exec, exec_type, file_type;
      4 
      5 # Uses network sockets.
      6 net_domain(netmgrd)
      7 
      8 # Talk to qmuxd (qmux_radio)
      9 qmux_socket(netmgrd)
     10 
     11 # Runs commands via sh.
     12 allow netmgrd shell_exec:file rx_file_perms;
     13 
     14 # Starts as (root,radio) changes to (radio,radio)
     15 allow netmgrd self:capability { setuid setgid net_admin net_raw };
     16 
     17 # Started by init
     18 init_daemon_domain(netmgrd)
     19 
     20 allow netmgrd shared_log_device:chr_file rw_file_perms;
     21 
     22 # Access to /proc/sys/net/*
     23 allow netmgrd proc_net:file rw_file_perms;
     24 allow netmgrd proc_net:dir r_dir_perms;
     25 
     26 # Runs /system/bin/toolbox
     27 allow netmgrd toolbox_exec:file rx_file_perms;
     28 # Run other system commands.
     29 allow netmgrd system_file:file rx_file_perms;
     30 
     31 #Allow operations on different types of sockets
     32 allow netmgrd self:netlink_socket create_socket_perms;
     33 allow netmgrd self:rawip_socket create_socket_perms;
     34 allow netmgrd self:netlink_route_socket nlmsg_write;
     35 allow netmgrd self:netlink_xfrm_socket { create_socket_perms nlmsg_write nlmsg_read };
     36 
     37 # b/17065650
     38 allow netmgrd self:socket create_socket_perms;
     39 
     40 #Allow communication with cnd
     41 unix_socket_connect(netmgrd, cnd, cnd)
     42 
     43 # CONFIG_MODULES not set in shamu_defconfig
     44 dontaudit netmgrd self:capability sys_module;
     45 
     46 # Set net_radio properties
     47 set_prop(netmgrd, net_radio_prop)
     48 
     49 #Set netmgrd properties
     50 allow netmgrd qcom_netmgrd_prop:property_service set;
     51 
     52 # Permission to run netd commands
     53 allow netmgrd netd_socket:sock_file write;
     54 
     55 #Allow access to files associated with netd
     56 allow netmgrd net_data_file:file r_file_perms;
     57 allow netmgrd net_data_file:dir r_dir_perms;
     58