1type dhcp, domain, domain_deprecated; 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 15# dhcpcd runs dhcpcd-hooks/*, which runs getprop / setprop (toolbox_exec) 16allow dhcp toolbox_exec:file rx_file_perms; 17 18# For /proc/sys/net/ipv4/conf/*/promote_secondaries 19allow dhcp proc_net:file write; 20 21set_prop(dhcp, dhcp_prop) 22set_prop(dhcp, pan_result_prop) 23 24type_transition dhcp system_data_file:{ dir file } dhcp_data_file; 25allow dhcp dhcp_data_file:dir create_dir_perms; 26allow dhcp dhcp_data_file:file create_file_perms; 27 28# PAN connections 29allow dhcp netd:fd use; 30allow dhcp netd:fifo_file rw_file_perms; 31allow dhcp netd:{ dgram_socket_class_set unix_stream_socket } { read write }; 32allow dhcp netd:{ netlink_kobject_uevent_socket netlink_route_socket netlink_nflog_socket } { read write }; 33