blob: e7103608f112ce6b198173255c2318978d2f9ba9 [file] [log] [blame]
rpcraig867ae052012-08-15 06:25:14 -04001type dhcp, domain;
Stephen Smalleyc48fd772013-10-29 14:42:35 -04002permissive dhcp;
rpcraig867ae052012-08-15 06:25:14 -04003type dhcp_exec, exec_type, file_type;
4type dhcp_data_file, file_type, data_file_type;
5type dhcp_system_file, file_type, data_file_type;
6
7init_daemon_domain(dhcp)
Geremy Condrae69552b2013-03-26 18:00:13 +00008net_domain(dhcp)
Stephen Smalleyc48fd772013-10-29 14:42:35 -04009
10allow dhcp cgroup:dir { create write add_name };
11allow dhcp self:capability { setgid setuid net_admin net_raw net_bind_service };
12allow dhcp self:packet_socket create_socket_perms;
13allow dhcp self:netlink_route_socket { create_socket_perms nlmsg_write };
14allow dhcp shell_exec:file rx_file_perms;
15allow dhcp system_file:file rx_file_perms;
Robert Craig529fcbe2014-01-07 13:46:56 -050016# For /proc/sys/net/ipv4/conf/*/promote_secondaries
17allow dhcp proc_net:file write;
Stephen Smalleyc48fd772013-10-29 14:42:35 -040018allow dhcp system_prop:property_service set ;
19allow dhcp dhcp_system_file:file rx_file_perms;
20allow dhcp dhcp_system_file:dir r_dir_perms;
21unix_socket_connect(dhcp, property, init)
22allow dhcp owntty_device:chr_file rw_file_perms;
rpcraig867ae052012-08-15 06:25:14 -040023
24type_transition dhcp system_data_file:{ dir file } dhcp_data_file;
Stephen Smalleyc48fd772013-10-29 14:42:35 -040025allow 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 };