]> xenbits.xensource.com Git - libvirt.git/commit
Create storage pool directories with proper uid/gid/mode
authorLaine Stump <laine@laine.org>
Wed, 20 Jan 2010 23:46:32 +0000 (00:46 +0100)
committerDaniel Veillard <veillard@redhat.com>
Wed, 20 Jan 2010 23:46:32 +0000 (00:46 +0100)
commit62927dd8f0337f27ed77ac375b74b66fdde6e40a
tree22e945f78b73bc92fbec67c3233a06c480434788
parente1f2778434049321e43eb3f7714180f2b023a907
Create storage pool directories with proper uid/gid/mode

Previously the uid/gid/mode in the xml was ignored when creating new
storage pool directories. This commit attempts to honor the requested
permissions, and spits out an error if it can't.

Note that when creating the directory, the rest of the path leading up
to the final element is created using current uid/gid/mode, and the
final element gets the settings from xml. It is NOT an error for the
directory to already exist; in this case, the perms for the existing
directory are just set (if necessary).

* src/storage/storage_backend_fs.c: update the virStorageBackendFileSystemBuild
  function to check the directory hierarchy separately then create the
  leaf directory with the right attributes
src/storage/storage_backend_fs.c