]> xenbits.xensource.com Git - libvirt.git/commit
storage: fs: Don't try to chown directory unless user requested
authorCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 4 May 2015 16:56:38 +0000 (12:56 -0400)
commit28c547ed6d3a42d3d838f294787e478b2126f1ed
tree7d4d29342c144bd02fccd19505cd12f196068488
parent262b3c05dd946328c4264bbab48958161e36aa6b
storage: fs: Don't try to chown directory unless user requested

Currently we try to chown any directory passed to virDirCreate,
even if the user didn't request any explicit owner/group via the
pool/vol XML.

This causes issues with qemu:///session: try to build a pool of
a root owned directory like /tmp, and it fails trying to chown the
directory to the session user. Instead it should just leave things
as they are, unless the user requests changing permissions via
the pool XML.

Similarly this is annoying if creating a storage pool via system
libvirtd of an existing directory in user $HOME, it's now owned
by root.

The virDirCreate function is pretty convoluted, since it needs to
fork off in certain specific cases. Try to document that, to make
it clear where exactly we are changing behavior.
src/util/virfile.c