Stephen Smalley | c6a28f0 | 2013-10-29 14:42:35 -0400 | [diff] [blame] | 1 | # DNS, DHCP services |
Nick Kralevich | dbd28d9 | 2013-06-27 15:11:02 -0700 | [diff] [blame] | 2 | type dnsmasq, domain; |
Stephen Smalley | c6a28f0 | 2013-10-29 14:42:35 -0400 | [diff] [blame] | 3 | permissive_or_unconfined(dnsmasq) |
Nick Kralevich | dbd28d9 | 2013-06-27 15:11:02 -0700 | [diff] [blame] | 4 | type dnsmasq_exec, exec_type, file_type; |
| 5 | |
Stephen Smalley | 1601132 | 2014-02-24 15:06:11 -0500 | [diff] [blame] | 6 | net_domain(dnsmasq) |
| 7 | |
Stephen Smalley | 1785940 | 2014-03-07 14:46:38 -0500 | [diff] [blame^] | 8 | allow dnsmasq self:capability { net_admin net_raw net_bind_service setgid setuid }; |
Stephen Smalley | c6a28f0 | 2013-10-29 14:42:35 -0400 | [diff] [blame] | 9 | |
| 10 | allow dnsmasq dhcp_data_file:dir w_dir_perms; |
| 11 | allow dnsmasq dhcp_data_file:file create_file_perms; |
Stephen Smalley | 1785940 | 2014-03-07 14:46:38 -0500 | [diff] [blame^] | 12 | |
| 13 | # Inherit and use open files from netd. |
| 14 | allow dnsmasq netd:fd use; |
| 15 | allow dnsmasq netd:fifo_file { read write }; |
| 16 | # TODO: Investigate whether these inherited sockets should be closed on exec. |
| 17 | allow dnsmasq netd:netlink_kobject_uevent_socket { read write }; |
| 18 | allow dnsmasq netd:netlink_nflog_socket { read write }; |
| 19 | allow dnsmasq netd:netlink_route_socket { read write }; |
| 20 | allow dnsmasq netd:unix_stream_socket { read write }; |