dnsmasq.te 1.0 KB

12345678910111213141516171819202122232425
  1. # DNS, DHCP services
  2. type dnsmasq, domain;
  3. type dnsmasq_exec, system_file_type, exec_type, file_type;
  4. net_domain(dnsmasq)
  5. allowxperm dnsmasq self:udp_socket ioctl priv_sock_ioctls;
  6. # TODO: Run with dhcp group to avoid need for dac_override.
  7. allow dnsmasq self:global_capability_class_set { dac_override dac_read_search };
  8. allow dnsmasq self:global_capability_class_set { net_admin net_raw net_bind_service setgid setuid };
  9. allow dnsmasq dhcp_data_file:dir w_dir_perms;
  10. allow dnsmasq dhcp_data_file:file create_file_perms;
  11. # Inherit and use open files from netd.
  12. allow dnsmasq netd:fd use;
  13. allow dnsmasq netd:fifo_file { getattr read write };
  14. # TODO: Investigate whether these inherited sockets should be closed on exec.
  15. allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
  16. allow dnsmasq netd:netlink_nflog_socket { read write };
  17. allow dnsmasq netd:netlink_route_socket { read write };
  18. allow dnsmasq netd:unix_stream_socket { getattr read write };
  19. allow dnsmasq netd:unix_dgram_socket { read write };
  20. allow dnsmasq netd:udp_socket { read write };