blob: d802a35579f389970489fb457fd7dd9f0540f443 [file] [log] [blame]
Stephen Smalleyc6a28f02013-10-29 14:42:35 -04001# DNS, DHCP services
Nick Kralevichdbd28d92013-06-27 15:11:02 -07002type dnsmasq, domain;
Nick Kralevichdbd28d92013-06-27 15:11:02 -07003type dnsmasq_exec, exec_type, file_type;
4
Stephen Smalley16011322014-02-24 15:06:11 -05005net_domain(dnsmasq)
6
Stephen Smalley45815c32014-03-12 15:12:52 -04007# TODO: Run with dhcp group to avoid need for dac_override.
8allow dnsmasq self:capability dac_override;
9
Stephen Smalley17859402014-03-07 14:46:38 -050010allow dnsmasq self:capability { net_admin net_raw net_bind_service setgid setuid };
Stephen Smalleyc6a28f02013-10-29 14:42:35 -040011
12allow dnsmasq dhcp_data_file:dir w_dir_perms;
13allow dnsmasq dhcp_data_file:file create_file_perms;
Stephen Smalley17859402014-03-07 14:46:38 -050014
15# Inherit and use open files from netd.
16allow dnsmasq netd:fd use;
17allow dnsmasq netd:fifo_file { read write };
18# TODO: Investigate whether these inherited sockets should be closed on exec.
19allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
20allow dnsmasq netd:netlink_nflog_socket { read write };
21allow dnsmasq netd:netlink_route_socket { read write };
22allow dnsmasq netd:unix_stream_socket { read write };
Stephen Smalley08461cb2014-03-18 10:45:15 -040023allow dnsmasq netd:unix_dgram_socket { read write };
Stephen Smalley7c11bdc2014-06-11 09:05:32 -040024allow dnsmasq netd:udp_socket { read write };