Google
  Web www.spinics.net

Re: [PATCH] storage: Inherit permissions of parent pool if they are not specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 09/20/2011 11:05 AM, Laine Stump wrote:
On 09/20/2011 04:38 AM, Osier Yang wrote:
If permissions (mode, uid, gid) are not specified, a new created vol
will get the permissions like:

mode = 0600
uid = -1
gid = -1

This will be a bit surprised if the user define the pool with a
non-root uid/gid, but the new created vol is still defined as
root/root.

This patch changes the behaviour so that the new created vol will
inherit the permissions of parent pool if permission are not
specified.

Should this behavior maybe be changed later on when the definition is
used, rather than during parsing? I tend to not like modifying the
incoming data as part of a parse (although I know we're already doing
that in some other places).

(Of course other people may have a different opinion, or there may be a
reason why my suggestion isn't feasible...)

I actually like the idea of keeping the user's data intact as long as possible, so I agree with Laine on refactoring the patch to delay the inheritance to the point of use when uid is still -1 (rather than reassigning uid at the time of parse).

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net