virfile: Introduce virFileUnlink
authorJohn Ferlan <jferlan@redhat.com>
Mon, 24 Aug 2015 21:00:02 +0000 (17:00 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 2 Sep 2015 22:57:15 +0000 (18:57 -0400)
commit966cc922221be2b8cc6a9842ed0dc4cf1568a7b3
treea7a35bd0d4bb2662b6c978c69c737eb4f0f02ff3
parent271250831b8bbaa4fac0cd7b9a846351ccd2f6f8
virfile: Introduce virFileUnlink

In an NFS root-squashed environment the 'vol-delete' command will fail to
'unlink' the target volume since it was created under a different uid:gid.

This code continues the concepts introduced in virFileOpenForked and
virDirCreate[NoFork] with respect to running the unlink command under
the uid/gid of the child. Unlike the other two, don't retry on EACCES
(that's why we're here doing this now).

(cherry picked from commit 35847860f65f92e444db9730e00cdaef45198e0c)
src/libvirt_private.syms
src/storage/storage_backend_fs.c
src/util/virfile.c
src/util/virfile.h