From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/9pfs: Use O_NOFOLLOW when opening files on server
Date: Wed, 22 May 2013 16:54:55 +0200 [thread overview]
Message-ID: <20130522145455.GG28600@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1369221774-10735-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Wed, May 22, 2013 at 04:52:54PM +0530, Aneesh Kumar K.V wrote:
> diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
> index fe8e0ed..e2a89e3 100644
> --- a/hw/9pfs/virtio-9p-handle.c
> +++ b/hw/9pfs/virtio-9p-handle.c
> @@ -608,7 +608,7 @@ static int handle_init(FsContext *ctx)
> struct file_handle fh;
> struct handle_data *data = g_malloc(sizeof(struct handle_data));
>
> - data->mountfd = open(ctx->fs_root, O_DIRECTORY);
> + data->mountfd = open(ctx->fs_root, O_DIRECTORY | O_NOFOLLOW);
Why is the root path not allowed to be a symlink?
And if so, it would be more user-friendly to resolve the path before
open. That way we don't need to bug the user with an error here.
next prev parent reply other threads:[~2013-05-22 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 11:22 [Qemu-devel] [PATCH] hw/9pfs: Use O_NOFOLLOW when opening files on server Aneesh Kumar K.V
2013-05-22 14:54 ` Stefan Hajnoczi [this message]
2013-05-23 8:24 ` Aneesh Kumar K.V
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=20130522145455.GG28600@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).