blob: ce4fef10bc8f38810edbcf3ed5e4da5ec5c05c6c [file] [log] [blame]
Alex Klyubinf5446eb2017-03-23 14:27:32 -07001typeattribute dhcp coredomain;
2
dcashmancc39f632016-07-22 13:13:11 -07003init_daemon_domain(dhcp)
4type_transition dhcp system_data_file:{ dir file } dhcp_data_file;
Inseob Kim55e5c9b2020-03-04 17:20:35 +09005
6set_prop(dhcp, dhcp_prop)
7set_prop(dhcp, pan_result_prop)
Inseob Kim75806ef2024-03-27 17:18:41 +09008
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 };