mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 22:45:21 +00:00
qemu: Don't propagate whole disk definition into qemuDomainGetImageIds
It will help re-using the function.
This commit is contained in:
parent
c6bf2f0ffc
commit
8e7cd8866c
@ -2408,7 +2408,7 @@ qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
|||||||
static void
|
static void
|
||||||
qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
|
qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk,
|
virStorageSourcePtr src,
|
||||||
uid_t *uid, gid_t *gid)
|
uid_t *uid, gid_t *gid)
|
||||||
{
|
{
|
||||||
virSecurityLabelDefPtr vmlabel;
|
virSecurityLabelDefPtr vmlabel;
|
||||||
@ -2431,7 +2431,7 @@ qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
|
|||||||
vmlabel->label)
|
vmlabel->label)
|
||||||
virParseOwnershipIds(vmlabel->label, uid, gid);
|
virParseOwnershipIds(vmlabel->label, uid, gid);
|
||||||
|
|
||||||
if ((disklabel = virStorageSourceGetSecurityLabelDef(disk->src, "dac")) &&
|
if ((disklabel = virStorageSourceGetSecurityLabelDef(src, "dac")) &&
|
||||||
disklabel->label)
|
disklabel->label)
|
||||||
virParseOwnershipIds(disklabel->label, uid, gid);
|
virParseOwnershipIds(disklabel->label, uid, gid);
|
||||||
}
|
}
|
||||||
@ -2460,7 +2460,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
qemuDomainGetImageIds(cfg, vm, disk, &uid, &gid);
|
qemuDomainGetImageIds(cfg, vm, disk->src, &uid, &gid);
|
||||||
|
|
||||||
if (virStorageFileGetMetadata(disk->src,
|
if (virStorageFileGetMetadata(disk->src,
|
||||||
uid, gid,
|
uid, gid,
|
||||||
|
Loading…
Reference in New Issue
Block a user