blob: 9a9882d664031391ba0dde9c8b6e9df09449ec2f [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 Smalley45815c32014-03-12 15:12:52 -04008# TODO: Run with dhcp group to avoid need for dac_override.
9allow dnsmasq self:capability dac_override;
10
Stephen Smalley17859402014-03-07 14:46:38 -050011allow dnsmasq self:capability { net_admin net_raw net_bind_service setgid setuid };
Stephen Smalleyc6a28f02013-10-29 14:42:35 -040012
13allow dnsmasq dhcp_data_file:dir w_dir_perms;
14allow dnsmasq dhcp_data_file:file create_file_perms;
Stephen Smalley17859402014-03-07 14:46:38 -050015
16# Inherit and use open files from netd.
17allow dnsmasq netd:fd use;
18allow dnsmasq netd:fifo_file { read write };
19# TODO: Investigate whether these inherited sockets should be closed on exec.
20allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
21allow dnsmasq netd:netlink_nflog_socket { read write };
22allow dnsmasq netd:netlink_route_socket { read write };
23allow dnsmasq netd:unix_stream_socket { read write };