mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu: don't pass virConnectPtr around for secrets
During domain startup there are many places where we need to acquire secrets. Currently code passes around a virConnectPtr, except in the places where we pass in NULL. So there are a few codepaths where ability to start guests using secrets will fail. Change to acquire a handle to the secret driver when needed. Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
1 parent
2d43f0a2dc
commit
6ea0ae9619
8 files changed
+119
-168
No files matched your search
@@ -120,10 +120,10 @@ testQemuHotplugAttach(virDomainObjPtr vm,
|
||||
/* conn in only used for storage pool and secrets lookup so as long
|
||||
* as we don't use any of them, passing NULL should be safe
|
||||
*/
|
||||
ret = qemuDomainAttachDeviceDiskLive(NULL, &driver, vm, dev);
|
||||
ret = qemuDomainAttachDeviceDiskLive(&driver, vm, dev);
|
||||
break;
|
||||
case VIR_DOMAIN_DEVICE_CHR:
|
||||
ret = qemuDomainAttachChrDevice(NULL, &driver, vm, dev->data.chr);
|
||||
ret = qemuDomainAttachChrDevice(&driver, vm, dev->data.chr);
|
||||
break;
|
||||
case VIR_DOMAIN_DEVICE_SHMEM:
|
||||
ret = qemuDomainAttachShmemDevice(&driver, vm, dev->data.shmem);
|
||||
|
||||
Reference in new issue
Block a user