1type dhcp, domain; 2type dhcp_exec, exec_type, file_type; 3type dhcp_data_file, file_type, data_file_type; 4 5init_daemon_domain(dhcp) 6net_domain(dhcp) 7 8allow dhcp cgroup:dir { create write add_name }; 9allow dhcp self:capability { setgid setuid net_admin net_raw net_bind_service }; 10allow dhcp self:packet_socket create_socket_perms; 11allow dhcp self:netlink_route_socket nlmsg_write; 12allow dhcp shell_exec:file rx_file_perms; 13allow dhcp system_file:file rx_file_perms; 14# For /proc/sys/net/ipv4/conf/*/promote_secondaries 15allow dhcp proc_net:file write; 16 17set_prop(dhcp, dhcp_prop) 18set_prop(dhcp, pan_result_prop) 19 20type_transition dhcp system_data_file:{ dir file } dhcp_data_file; 21allow dhcp dhcp_data_file:dir create_dir_perms; 22allow dhcp dhcp_data_file:file create_file_perms; 23 24# PAN connections 25allow dhcp netd:fd use; 26allow dhcp netd:fifo_file rw_file_perms; 27allow dhcp netd:{ dgram_socket_class_set unix_stream_socket } { read write }; 28allow dhcp netd:{ netlink_kobject_uevent_socket netlink_route_socket netlink_nflog_socket } { read write }; 29