blob: 61382a207c039dda2b8b233d79e5e71da00b0808 [file] [log] [blame]
Stephen Smalleyc6a28f02013-10-29 14:42:35 -04001# DNS, DHCP services
Nick Kralevichdbd28d92013-06-27 15:11:02 -07002type dnsmasq, domain;
Stephen Smalleyc6a28f02013-10-29 14:42:35 -04003permissive_or_unconfined(dnsmasq)
Nick Kralevichdbd28d92013-06-27 15:11:02 -07004type dnsmasq_exec, exec_type, file_type;
5
Stephen Smalley16011322014-02-24 15:06:11 -05006net_domain(dnsmasq)
7
Stephen Smalley17859402014-03-07 14:46:38 -05008allow dnsmasq self:capability { net_admin net_raw net_bind_service setgid setuid };
Stephen Smalleyc6a28f02013-10-29 14:42:35 -04009
10allow dnsmasq dhcp_data_file:dir w_dir_perms;
11allow dnsmasq dhcp_data_file:file create_file_perms;
Stephen Smalley17859402014-03-07 14:46:38 -050012
13# Inherit and use open files from netd.
14allow dnsmasq netd:fd use;
15allow dnsmasq netd:fifo_file { read write };
16# TODO: Investigate whether these inherited sockets should be closed on exec.
17allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
18allow dnsmasq netd:netlink_nflog_socket { read write };
19allow dnsmasq netd:netlink_route_socket { read write };
20allow dnsmasq netd:unix_stream_socket { read write };