<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 19 June 2015 at 21:30, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Quoting Michal Dubiel (<a href="mailto:md@semihalf.com">md@semihalf.com</a>):<br>
> QEMU working in vhost-user mode communicates with the other end (i.e.<br>
> some virtual router application) via unix domain sockets. This requires<br>
> that permissions for the socket files are correctly written into<br>
> /etc/apparmor.d/libvirt/libvirt-UUID.files.<br>
><br>
> Signed-off-by: Michal Dubiel <<a href="mailto:md@semihalf.com">md@semihalf.com</a>><br>
> ---<br>
>  src/security/virt-aa-helper.c | 24 +++++++++++++-----------<br>
>  1 file changed, 13 insertions(+), 11 deletions(-)<br>
><br>
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c<br>
> index 35423b5..a097aa6 100644<br>
> --- a/src/security/virt-aa-helper.c<br>
> +++ b/src/security/virt-aa-helper.c<br>
> @@ -592,19 +592,9 @@ valid_path(const char *path, const bool readonly)<br>
><br>
>      if (!virFileExists(path)) {<br>
>          vah_warning(_("path does not exist, skipping file type checks"));<br>
> -    } else {<br>
> -        if (stat(path, &sb) == -1)<br>
> +    } else if (stat(path, &sb) == -1)<br>
>              return -1;<br>
<br>
</span>Hi,<br>
<br>
Why keep this bit?  sb is not used later in the fn, and you<br>
already know that access(2) didn't return ENOENT.</blockquote><div><br></div><div>You are right, it is not needed. Thanks for pointing this out. I will update the patch accordingly. </div><div><br></div><div>Regards,</div><div>Michal</div></div></div></div>