All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Farhan Ali <alifm@linux.ibm.com>,
	qemu-block@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>,
	Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] qemu-iotests 232 fails when running the test as root user
Date: Fri, 30 Nov 2018 10:00:00 +0000	[thread overview]
Message-ID: <20181130100000.GE8101@redhat.com> (raw)
In-Reply-To: <79b674dd-d5b5-ff7c-7497-6fce2cb31b8a@redhat.com>

On Thu, Nov 29, 2018 at 03:07:54PM -0600, Eric Blake wrote:
> On 11/29/18 3:03 PM, Farhan Ali wrote:
> > Hi,
> > 
> > I am seeing a failure of the qemu-iotest number 232 when running the
> > test as a root user. Is this the expected behavior?
> > 
> > Here is the output of the failure:
> > 
> 
> > -QEMU_PROG: -drive driver=file,file=TEST_DIR/t.IMGFMT,if=none,read-only=off,auto-read-only=off:
> > Could not open 'TEST_DIR/t.IMGFMT': Permission denied
> > -NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only)
> > -NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only)
> > -
> > -QEMU_PROG: -drive
> > driver=file,file=TEST_DIR/t.IMGFMT,if=none,auto-read-only=off: Could not
> > open 'TEST_DIR/t.IMGFMT': Permission denied
> > -NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only)
> > -NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only)
> > +NODE_NAME: TEST_DIR/t.IMGFMT (file)
> 
> Not entirely unexpected (since root can read what are otherwise read-only
> files), but obviously unexpected by the test. The test should probably
> refuse to run as root.

I'd suggest that *all* our tests shoudl refuse to run as root as a matter
of principal. The risk of them doing damage is way too high and there is
no good reason why anyone should be building & testing QEMU as root
rather than an unprivileged user.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

      parent reply	other threads:[~2018-11-30 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 21:03 [Qemu-devel] qemu-iotests 232 fails when running the test as root user Farhan Ali
2018-11-29 21:07 ` Eric Blake
2018-11-29 21:46   ` Farhan Ali
2018-11-30 10:00   ` Daniel P. Berrangé [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=20181130100000.GE8101@redhat.com \
    --to=berrange@redhat.com \
    --cc=alifm@linux.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.