mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00

that fixes the following: - allow net_admin capability for DHCP server - allow net_raw and network inet raw for ICMP pings when used as a DHCP server - allow read and write access to libvirt pid files for dnsmasq See the FAQ in the dnsmasq source for details. This fixes https://launchpad.net/bugs/697239 Nominated-by: Jamie Strandboge <jamie@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>
41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
# ------------------------------------------------------------------
|
|
#
|
|
# 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.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
#include <tunables/global>
|
|
/usr/sbin/dnsmasq {
|
|
#include <abstractions/base>
|
|
#include <abstractions/nameservice>
|
|
|
|
capability net_bind_service,
|
|
capability setgid,
|
|
capability setuid,
|
|
capability dac_override,
|
|
capability net_admin, # for DHCP server
|
|
capability net_raw, # for DHCP server ping checks
|
|
network inet raw,
|
|
|
|
/etc/dnsmasq.conf r,
|
|
/etc/dnsmasq.d/ r,
|
|
/etc/dnsmasq.d/* r,
|
|
|
|
/usr/sbin/dnsmasq mr,
|
|
|
|
/var/run/*dnsmasq*.pid w,
|
|
/var/run/dnsmasq/ r,
|
|
/var/run/dnsmasq/* rw,
|
|
|
|
/var/lib/misc/dnsmasq.leases rw, # Required only for DHCP server usage
|
|
|
|
# libvirt pid files for dnsmasq
|
|
/var/run/libvirt/network/ r,
|
|
/var/run/libvirt/network/*.pid rw,
|
|
|
|
}
|