[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu-iotests 232 fails when running the test as root us
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] qemu-iotests 232 fails when running the test as root user |
Date: |
Fri, 30 Nov 2018 10:00:00 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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 :|