qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] 9pfs-local: open2() deletes existing data?
Date: Thu, 05 Mar 2015 00:10:35 +0300	[thread overview]
Message-ID: <54F774CB.1040001@msgid.tls.msk.ru> (raw)

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

Thanks,

/mjt

             reply	other threads:[~2015-03-04 21:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 21:10 Michael Tokarev [this message]
2015-03-05 18:02 ` [Qemu-devel] 9pfs-local: open2() deletes existing data? 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=54F774CB.1040001@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --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).