2011-01-12 11:47:04 -06:00
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (C) 2009 John Dong <jdong@ubuntu.com>
|
|
|
|
# Copyright (C) 2010 Canonical Ltd.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
2010-08-05 14:00:02 -05:00
|
|
|
|
2020-05-05 00:08:39 -07:00
|
|
|
abi <abi/3.0>,
|
|
|
|
|
2018-09-30 13:55:44 +03:00
|
|
|
@{TFTP_DIR}=/var/tftp /srv/tftp /srv/tftpboot
|
2011-12-16 12:15:12 -05:00
|
|
|
|
2020-06-09 23:30:24 +02:00
|
|
|
include <tunables/global>
|
2018-07-25 14:07:35 -07:00
|
|
|
profile dnsmasq /usr/{bin,sbin}/dnsmasq flags=(attach_disconnected) {
|
2020-06-09 23:30:24 +02:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/dbus>
|
|
|
|
include <abstractions/nameservice>
|
2009-11-04 14:25:42 -06:00
|
|
|
|
2018-02-07 07:57:55 +00:00
|
|
|
capability chown,
|
2009-11-04 14:25:42 -06:00
|
|
|
capability net_bind_service,
|
|
|
|
capability setgid,
|
|
|
|
capability setuid,
|
|
|
|
capability dac_override,
|
2011-01-12 11:47:04 -06:00
|
|
|
capability net_admin, # for DHCP server
|
|
|
|
capability net_raw, # for DHCP server ping checks
|
|
|
|
network inet raw,
|
2014-12-02 18:46:26 +01:00
|
|
|
network inet6 raw,
|
2009-11-04 14:25:42 -06:00
|
|
|
|
2018-07-25 14:07:35 -07:00
|
|
|
signal (receive) peer=/usr/{bin,sbin}/libvirtd,
|
2019-01-13 17:38:09 +01:00
|
|
|
signal (receive) peer=libvirtd,
|
2018-07-25 14:07:35 -07:00
|
|
|
ptrace (readby) peer=/usr/{bin,sbin}/libvirtd,
|
2019-01-13 17:38:09 +01:00
|
|
|
ptrace (readby) peer=libvirtd,
|
2014-06-23 15:31:40 -05:00
|
|
|
|
2015-10-16 21:50:21 +02:00
|
|
|
owner /dev/tty rw,
|
|
|
|
|
2020-04-12 12:12:59 +03:00
|
|
|
@{PROC}/@{pid}/fd/ r,
|
|
|
|
|
2009-11-04 14:25:42 -06:00
|
|
|
/etc/dnsmasq.conf r,
|
|
|
|
/etc/dnsmasq.d/ r,
|
|
|
|
/etc/dnsmasq.d/* r,
|
2015-11-09 20:05:25 -05:00
|
|
|
/etc/dnsmasq.d-available/ r,
|
|
|
|
/etc/dnsmasq.d-available/* r,
|
2011-08-08 23:13:15 +02:00
|
|
|
/etc/ethers r,
|
2014-02-17 22:56:02 +01:00
|
|
|
/etc/NetworkManager/dnsmasq.d/ r,
|
|
|
|
/etc/NetworkManager/dnsmasq.d/* r,
|
2018-09-18 12:57:22 +03:00
|
|
|
/etc/NetworkManager/dnsmasq-shared.d/ r,
|
|
|
|
/etc/NetworkManager/dnsmasq-shared.d/* r,
|
2020-02-20 11:39:10 +02:00
|
|
|
/etc/dnsmasq-conf.conf r,
|
|
|
|
/etc/dnsmasq-resolv.conf r,
|
2009-11-04 14:25:42 -06:00
|
|
|
|
2018-07-25 14:07:35 -07:00
|
|
|
/usr/{bin,sbin}/dnsmasq mr,
|
2009-11-04 14:25:42 -06:00
|
|
|
|
2018-12-07 23:40:19 +01:00
|
|
|
/var/log/dnsmasq*.log w,
|
2018-10-08 16:44:01 +02:00
|
|
|
|
2020-05-25 10:42:26 +00:00
|
|
|
/usr/share/dnsmasq{-base,}/ r,
|
|
|
|
/usr/share/dnsmasq{-base,}/* r,
|
2018-09-18 12:57:22 +03:00
|
|
|
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/*dnsmasq*.pid w,
|
|
|
|
@{run}/dnsmasq-forwarders.conf r,
|
|
|
|
@{run}/dnsmasq/ r,
|
|
|
|
@{run}/dnsmasq/* rw,
|
2009-11-04 14:25:42 -06:00
|
|
|
|
|
|
|
/var/lib/misc/dnsmasq.leases rw, # Required only for DHCP server usage
|
2010-08-05 14:00:02 -05:00
|
|
|
|
2015-10-20 23:12:35 +02:00
|
|
|
/{,usr/}bin/{ba,da,}sh ix, # Required to execute --dhcp-script argument
|
2014-12-22 17:56:37 +01:00
|
|
|
|
2014-09-06 23:06:46 +02:00
|
|
|
# access to iface mtu needed for Router Advertisement messages in IPv6
|
|
|
|
# Neighbor Discovery protocol (RFC 2461)
|
2014-09-08 20:35:31 +02:00
|
|
|
@{PROC}/sys/net/ipv6/conf/*/mtu r,
|
2014-09-06 23:06:46 +02:00
|
|
|
|
2011-12-17 12:20:53 -05:00
|
|
|
# for the read-only TFTP server
|
2011-12-16 12:15:12 -05:00
|
|
|
@{TFTP_DIR}/ r,
|
2011-12-17 12:20:53 -05:00
|
|
|
@{TFTP_DIR}/** r,
|
2011-12-16 12:15:12 -05:00
|
|
|
|
2015-08-12 16:25:56 +02:00
|
|
|
# libvirt config and hosts file for dnsmasq
|
2014-08-20 22:06:15 -05:00
|
|
|
/var/lib/libvirt/dnsmasq/ r,
|
|
|
|
/var/lib/libvirt/dnsmasq/* r,
|
2011-07-25 08:28:04 -05:00
|
|
|
|
2011-01-12 11:47:04 -06:00
|
|
|
# libvirt pid files for dnsmasq
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/libvirt/network/ r,
|
|
|
|
@{run}/libvirt/network/*.pid rw,
|
2011-01-12 11:47:04 -06:00
|
|
|
|
2014-08-20 22:06:15 -05:00
|
|
|
# libvirt lease helper
|
2015-08-12 16:25:56 +02:00
|
|
|
/usr/lib{,64}/libvirt/libvirt_leaseshelper Cx -> libvirt_leaseshelper,
|
2020-03-28 12:42:13 -07:00
|
|
|
/usr/libexec/libvirt_leaseshelper Cx -> libvirt_leaseshelper,
|
2014-08-20 22:06:15 -05:00
|
|
|
|
2015-03-29 20:49:09 -07:00
|
|
|
# lxc-net pid and lease files
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/lxc/dnsmasq.pid rw,
|
2015-03-29 20:49:09 -07:00
|
|
|
/var/lib/misc/dnsmasq.*.leases rw,
|
|
|
|
|
2016-04-08 16:23:47 -04:00
|
|
|
# lxd-bridge pid and lease files
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/lxd-bridge/dnsmasq.pid rw,
|
2016-04-08 16:23:47 -04:00
|
|
|
/var/lib/lxd-bridge/dnsmasq.*.leases rw,
|
2016-10-21 13:07:14 +02:00
|
|
|
/var/lib/lxd/networks/*/dnsmasq.* r,
|
2016-10-18 13:22:53 +02:00
|
|
|
/var/lib/lxd/networks/*/dnsmasq.leases rw,
|
2016-10-21 13:07:14 +02:00
|
|
|
/var/lib/lxd/networks/*/dnsmasq.pid rw,
|
2016-04-08 16:23:47 -04:00
|
|
|
|
2012-01-18 16:20:43 -06:00
|
|
|
# NetworkManager integration
|
2018-09-18 12:57:22 +03:00
|
|
|
/var/lib/NetworkManager/dnsmasq-*.leases rw,
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/nm-dns-dnsmasq.conf r,
|
|
|
|
@{run}/nm-dnsmasq-*.pid rw,
|
|
|
|
@{run}/sendsigs.omit.d/*dnsmasq.pid w,
|
|
|
|
@{run}/NetworkManager/dnsmasq.conf r,
|
|
|
|
@{run}/NetworkManager/dnsmasq.pid w,
|
|
|
|
@{run}/NetworkManager/NetworkManager.pid w,
|
2012-01-18 16:20:43 -06:00
|
|
|
|
2021-09-16 23:05:57 +02:00
|
|
|
# dnsname plugin in podman
|
|
|
|
@{run}/containers/cni/dnsname/*/dnsmasq.conf r,
|
|
|
|
@{run}/containers/cni/dnsname/*/addnhosts r,
|
|
|
|
@{run}/containers/cni/dnsname/*/pidfile rw,
|
2022-08-22 09:52:12 +00:00
|
|
|
owner @{run}/user/*/containers/cni/dnsname/*/dnsmasq.conf r,
|
|
|
|
owner @{run}/user/*/containers/cni/dnsname/*/addnhosts r,
|
|
|
|
owner @{run}/user/*/containers/cni/dnsname/*/pidfile rw,
|
2021-09-16 23:05:57 +02:00
|
|
|
|
2023-01-22 18:11:00 +00:00
|
|
|
# waydroid lxc-net pid file
|
|
|
|
@{run}/waydroid-lxc/dnsmasq.pid rw,
|
|
|
|
|
2015-08-12 16:25:56 +02:00
|
|
|
profile libvirt_leaseshelper {
|
2020-06-09 23:30:24 +02:00
|
|
|
include <abstractions/base>
|
2015-08-12 16:25:56 +02:00
|
|
|
|
|
|
|
/etc/libnl-3/classid r,
|
|
|
|
|
2022-08-08 20:48:12 +02:00
|
|
|
/usr/lib{,64}/libvirt/libvirt_leaseshelper mr,
|
|
|
|
/usr/libexec/libvirt_leaseshelper mr,
|
2016-11-06 10:48:34 +01:00
|
|
|
|
2015-08-12 16:25:56 +02:00
|
|
|
owner @{PROC}/@{pid}/net/psched r,
|
|
|
|
owner @{PROC}/@{pid}/status r,
|
|
|
|
|
2018-11-08 20:00:45 +02:00
|
|
|
@{sys}/devices/system/cpu/ r,
|
2022-10-29 12:50:44 +00:00
|
|
|
@{sys}/devices/system/cpu/possible r,
|
2018-11-08 20:00:45 +02:00
|
|
|
@{sys}/devices/system/node/ r,
|
|
|
|
@{sys}/devices/system/node/*/meminfo r,
|
2015-08-12 16:25:56 +02:00
|
|
|
|
|
|
|
# libvirt lease and status files for dnsmasq
|
|
|
|
/var/lib/libvirt/dnsmasq/*.leases rw,
|
|
|
|
/var/lib/libvirt/dnsmasq/*.status* rw,
|
|
|
|
|
2020-02-13 11:02:49 +02:00
|
|
|
@{run}/leaseshelper.pid rwk,
|
2015-08-12 16:25:56 +02:00
|
|
|
}
|
|
|
|
|
2010-08-05 14:00:02 -05:00
|
|
|
# Site-specific additions and overrides. See local/README for details.
|
2020-04-28 22:25:27 +02:00
|
|
|
include if exists <local/usr.sbin.dnsmasq>
|
2009-11-04 14:25:42 -06:00
|
|
|
}
|