[libvirt] [PATCH 5/8] apparmor, virt-aa-helper: Explicit denies for host devices

Guido Günther agx at sigxcpu.org
Fri May 19 07:50:44 UTC 2017


On Thu, May 18, 2017 at 10:53:43AM +0200, Stefan Bader wrote:
> From: Felix Geyer <fgeyer at debian.org>
> 
> Add explicit denies for disk devices to avoid cluttering dmesg with
> (acceptable) denials (merged with a second patch which added more
> disk device names).
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
> Acked-by: Guido Günther <agx at sigxcpu.org>
> ---
>  examples/apparmor/usr.lib.libvirt.virt-aa-helper | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
> index ee53c2c..012080c 100644
> --- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
> +++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
> @@ -21,6 +21,15 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
>    # for hostdev
>    /sys/devices/ r,
>    /sys/devices/** r,
> +  deny /dev/sd* r,
> +  deny /dev/vd* r,
> +  deny /dev/dm-* r,
> +  deny /dev/drbd[0-9]* r,
> +  deny /dev/dasd* r,
> +  deny /dev/nvme* r,
> +  deny /dev/zd[0-9]* r,
> +  deny /dev/mapper/ r,
> +  deny /dev/mapper/* r,
>  
>    /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
>    /{usr/,}sbin/apparmor_parser Ux,

Pushed. Thanks!
 -- Guido

> -- 
> 2.7.4
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list




More information about the libvir-list mailing list