1type dhcp, domain; 2type dhcp_exec, system_file_type, exec_type, file_type; 3 4net_domain(dhcp) 5 6allow dhcp cgroup:dir { create write add_name }; 7allow dhcp self:global_capability_class_set { setgid setuid net_admin net_raw net_bind_service }; 8allow dhcp self:packet_socket create_socket_perms_no_ioctl; 9allow dhcp self:netlink_route_socket nlmsg_write; 10allow dhcp shell_exec:file rx_file_perms; 11allow dhcp system_file:file rx_file_perms; 12not_full_treble(`allow dhcp vendor_file:file rx_file_perms;') 13 14# dhcpcd runs dhcpcd-hooks/*, which runs getprop / setprop (toolbox_exec) 15allow dhcp toolbox_exec:file rx_file_perms; 16 17# For /proc/sys/net/ipv4/conf/*/promote_secondaries 18allow dhcp proc_net_type:file write; 19 20allow dhcp dhcp_data_file:dir create_dir_perms; 21allow dhcp dhcp_data_file:file create_file_perms; 22 23# PAN connections 24allow dhcp netd:fd use; 25allow dhcp netd:fifo_file rw_file_perms; 26allow dhcp netd:{ dgram_socket_class_set unix_stream_socket } { read write }; 27allow dhcp netd:{ netlink_kobject_uevent_socket netlink_route_socket netlink_nflog_socket } { read write }; 28