All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] 9pfs-local: open2() deletes existing data?
Date: Thu, 05 Mar 2015 23:32:30 +0530	[thread overview]
Message-ID: <87oao7s4p5.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <54F774CB.1040001@msgid.tls.msk.ru>

Michael Tokarev <mjt@tls.msk.ru> writes:

> I was looking at various interesting functions in hw/9pfs/virtio-9p-local.c
> and noticed local_open2() which basically tries to open a file in a
> filesystem, and if that is successful, it tries to set file credentials
> using a configured mechanism, and if that fails, it deletes the file.
>
> Now I wonder what happens if we tried to open an existing file but was
> not able to set credentials for whatever reason -- eg, because the
> underlying filesystem does not support xattrs, or whatever.  It looks
> to me that we will remove the user file!
>
> If that's the case, it looks like it is a very serious bug...

That callback is used for create. What is used for open is local_open()

-aneesh

      reply	other threads:[~2015-03-05 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 21:10 [Qemu-devel] 9pfs-local: open2() deletes existing data? Michael Tokarev
2015-03-05 18:02 ` 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=87oao7s4p5.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=mjt@tls.msk.ru \
    --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.