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