From: Eric Blake <eblake@redhat.com>
To: Cole Robinson <crobinso@redhat.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] qemu-sockets: Report explicit error if unlink fails
Date: Wed, 29 Apr 2015 11:10:40 -0600 [thread overview]
Message-ID: <55411090.3070204@redhat.com> (raw)
In-Reply-To: <039dc3828328fe8cb59e2b74936bc67e9f01581f.1430326928.git.crobinso@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
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 <crobinso@redhat.com>
> ---
> 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 <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-04-29 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 16:37 [Qemu-devel] [PATCH 0/3] vnc: Fixes for unix socket error handling Cole Robinson
2015-04-29 16:37 ` [Qemu-devel] [PATCH 1/3] vnc: Don't assert if opening unix socket fails Cole Robinson
2015-05-05 9:48 ` Gerd Hoffmann
2015-04-29 16:37 ` [Qemu-devel] [PATCH 2/3] vnc: Tweak error when init fails Cole Robinson
2015-04-29 16:37 ` [Qemu-devel] [PATCH 3/3] qemu-sockets: Report explicit error if unlink fails Cole Robinson
2015-04-29 17:03 ` [Qemu-devel] [PATCH v2] " Cole Robinson
2015-04-29 17:10 ` Eric Blake [this message]
2015-04-29 16:53 ` [Qemu-devel] [PATCH 0/3] vnc: Fixes for unix socket error handling Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55411090.3070204@redhat.com \
--to=eblake@redhat.com \
--cc=crobinso@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.