xref: /aosp_15_r20/system/sepolicy/private/dnsmasq.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1typeattribute dnsmasq coredomain;
2
3net_domain(dnsmasq)
4allowxperm dnsmasq self:udp_socket ioctl priv_sock_ioctls;
5
6# TODO:  Run with dhcp group to avoid need for dac_override.
7allow dnsmasq self:global_capability_class_set { dac_override dac_read_search };
8
9allow dnsmasq self:global_capability_class_set { net_admin net_raw net_bind_service setgid setuid };
10
11allow dnsmasq dhcp_data_file:dir w_dir_perms;
12allow dnsmasq dhcp_data_file:file create_file_perms;
13
14# Inherit and use open files from netd.
15allow dnsmasq netd:fd use;
16allow dnsmasq netd:fifo_file { getattr read write };
17# TODO: Investigate whether these inherited sockets should be closed on exec.
18allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
19allow dnsmasq netd:netlink_nflog_socket { read write };
20allow dnsmasq netd:netlink_route_socket { read write };
21allow dnsmasq netd:unix_stream_socket { getattr read write };
22allow dnsmasq netd:unix_dgram_socket { read write };
23allow dnsmasq netd:udp_socket { read write };
24