[libvirt] [PATCH 4/4] virt-aa-helper: put static rules in quotes

Jamie Strandboge jamie at canonical.com
Wed Oct 25 18:35:23 UTC 2017


On Wed, 2017-09-20 at 16:59 +0200, Christian Ehrhardt wrote:
> To avoid any issues later on if paths ever change (unlikely but
> possible) and to match the style of other generated rules the paths
> of the static rules have to be quoted as well.
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> ---
>  src/security/virt-aa-helper.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-
> helper.c
> index 5f4519d..95906e6 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -1149,11 +1149,11 @@ get_files(vahControl * ctl)
>          }
>      }
>      if (needsvhost)
> -        virBufferAddLit(&buf, "  /dev/vhost-net rw,\n");
> +        virBufferAddLit(&buf, "  \"/dev/vhost-net\" rw,\n");
>  
>      if (needsVfio) {
> -        virBufferAddLit(&buf, "  /dev/vfio/vfio rw,\n");
> -        virBufferAddLit(&buf, "  /dev/vfio/[0-9]* rw,\n");
> +        virBufferAddLit(&buf, "  \"/dev/vfio/vfio\" rw,\n");
> +        virBufferAddLit(&buf, "  \"/dev/vfio/[0-9]*\" rw,\n");
>      }
>  
>      if (ctl->newfile)

LGTM +1
-- 
Jamie Strandboge             | http://www.canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171025/ccf55a71/attachment-0001.sig>


More information about the libvir-list mailing list