]> git.ipfire.org Git - thirdparty/libvirt.git/commit
blockjob: properly label disks for qemu block-commit
authorEric Blake <eblake@redhat.com>
Tue, 16 Oct 2012 14:46:41 +0000 (08:46 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Oct 2012 23:56:39 +0000 (17:56 -0600)
commit2e43cb8e9090969eb33fafa2a785211478a1f394
tree06101d4f6b906f87f679252e8f696775a527b42e
parent35a2f5bc52855b2728f69b0256b54bc1a9c5ffa5
blockjob: properly label disks for qemu block-commit

I finally have all the pieces in place to perform a block-commit with
SELinux enforcing.  There's still missing cleanup work when the commit
completes, but doing that requires tracking both the backing chain and
the base and top files within that chain in domain XML across libvirtd
restarts.  Furthermore, from a security standpoint, once you have
granted access, you must assume any damage that can be done will be
done; later revoking access is nice to minimize the window of damage,
but less important as it does not affect the fact that damage can be
done in the first place.  Therefore, deferring the revoke efforts until
we have better XML tracking of what chain operations are in effect,
including across a libvirtd restart, is reasonable.

* src/qemu/qemu_driver.c (qemuDomainBlockCommit): Label disks as
needed.
(qemuDomainPrepareDiskChainElement): Cast away const.
src/qemu/qemu_driver.c