Fixed to abide domain seclabel model='dac' override Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/qemu/qemu_driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 80e276b7df..59b9601360 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14310,6 +14310,8 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, bool syncWrites = !!(flags & VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES); bool targetIsZero = !!(flags & VIR_DOMAIN_BLOCK_COPY_TARGET_ZEROED); int rc = 0; + uid_t uid; + gid_t gid; /* Preliminaries: find the disk we are editing, sanity checks */ virCheckFlags(VIR_DOMAIN_BLOCK_COPY_SHALLOW | @@ -14414,10 +14416,11 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, * can also pass the RAW flag or use XML to tell us the format. * So if we get here, we assume it is safe for us to probe the * format from the file that we will be using. */ + qemuDomainGetImageIds(cfg, vm->def, NULL, NULL, &uid, &gid); if (!supports_detect || !virStorageSourceIsLocalStorage(mirror) || - (mirror->format = virStorageFileProbeFormat(mirror->path, cfg->user, - cfg->group)) < 0) { + (mirror->format = virStorageFileProbeFormat(mirror->path, uid, + gid)) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("reused mirror destination format must be specified")); goto endjob; -- 2.53.0