All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.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: Thu, 23 May 2013 13:54:43 +0530	[thread overview]
Message-ID: <87wqqq3xys.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130522145455.GG28600@stefanha-thinkpad.redhat.com>

Stefan Hajnoczi <stefanha@gmail.com> writes:

> 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?

No specific reason. 

>
> 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.

I will drop that hunk.

-aneesh

      reply	other threads:[~2013-05-23  8:32 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
2013-05-23  8:24   ` Aneesh Kumar K.V [this message]

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=87wqqq3xys.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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.