qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qemu-sockets: Report explicit error if unlin


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] qemu-sockets: Report explicit error if unlink fails
Date: Wed, 29 Apr 2015 11:10:40 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/29/2015 11:03 AM, Cole Robinson wrote:
> Consider this case:
> 
> $ ls -ld ~/root-owned/
> drwx--x--x. 2 root root 4096 Apr 29 12:55 /home/crobinso/root-owned/
> $ ls -l ~/root-owned/foo.sock
> -rwxrwxrwx. 1 crobinso crobinso 0 Apr 29 12:55 
> /home/crobinso/root-owned/foo.sock
> 
> $ qemu-system-x86_64 -vnc unix:~/root-owned/foo.sock
> qemu-system-x86_64: -vnc unix:/home/crobinso/root-owned/foo.sock: Failed to 
> start VNC server: Failed to bind socket to 
> /home/crobinso/root-owned/foo.sock: Address already in use
> 
> ...which is techinically true, but the real error is that we failed to
> unlink. So report it.
> 
> This may seem pathological but it's a real possibility via libvirt.
> 
> Signed-off-by: Cole Robinson <address@hidden>
> ---
> Sigh, sent an old version of the patch accidentally
> 
> v2:
>     Fix the access check
>     Better commit message

Sigh, and I was too hasty in my review of v1 to notice the logic bug in
access() use.  v2 is definitely better:

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]