]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use virFileOperation hook function in virStorageBackendFileSystemVolBuild
authorLaine Stump <laine@laine.org>
Fri, 19 Feb 2010 17:12:01 +0000 (18:12 +0100)
committerDaniel Veillard <veillard@redhat.com>
Fri, 19 Feb 2010 17:12:01 +0000 (18:12 +0100)
commit6ef20bb7ae49eb7795499d1bb9d0fb2bdbc21024
treeecfe1e3e01889f58f4e52804ee898844be39e414
parentfbadc2b608122f387bfa13fb4f4334eb32ada63d
Use virFileOperation hook function in virStorageBackendFileSystemVolBuild

There were a few operations on the storage volume file that were still
being done as root, which will fail if the file is on a root-squashed
NFS share. The result was that attempts to create a storage volume of
type "raw" on a root-squashed NFS share would fail.

This patch uses the newly introduced "hook" function in
virFileOperation to execute all those file operations in the child
process that's run under the uid that owns the file (and, presumably,
has permission to write to the NFS share)

* src/storage/storage_backend.c: use virFileOperation() in
  virStorageBackendCreateRaw, turning virStorageBackendCreateRaw()
  into a new createRawFileOpHook() hook
src/storage/storage_backend.c