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