1type dhcp, domain; 2type dhcp_exec, exec_type, file_type; 3 4net_domain(dhcp) 5 6allow dhcp cgroup:dir { create write add_name }; 7allow dhcp self:capability { 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:file write; 19 20set_prop(dhcp, dhcp_prop) 21set_prop(dhcp, pan_result_prop) 22 23allow dhcp dhcp_data_file:dir create_dir_perms; 24allow dhcp dhcp_data_file:file create_file_perms; 25 26# PAN connections 27allow dhcp netd:fd use; 28allow dhcp netd:fifo_file rw_file_perms; 29allow dhcp netd:{ dgram_socket_class_set unix_stream_socket } { read write }; 30allow dhcp netd:{ netlink_kobject_uevent_socket netlink_route_socket netlink_nflog_socket } { read write }; 31