[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH VERSION 3] Disk image exclusive and shared locks
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH VERSION 3] Disk image exclusive and shared locks. |
Date: |
Thu, 17 Dec 2009 13:26:06 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Kevin Wolf wrote:
> > You might think the user could do that by setting the permissions to
> > read-only, but root ignores file permissions. (That's why we need a
> > "ro" option too).
>
> We do have readonly=on|off.
Sure, but if you have to do that for safe behaviour when running qemu
as root, and you don't need it when running qemu as a user because you
get into the habit of depending on file permissions, that's asking for
an accident to happen.
I know this, because I have accidentally opened read-only images
writable when putting "sudo" at the start of a qemu command to make
something completely unrelated work (networking).
Imho, the open-writable-if-permissions-allow-else-fallback-to-readable
behaviour should either be abolished entirely (not such a bad idea),
or be made to behave consistently no matter what user is used to run qemu.
-- Jamie