mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virDomainInterfaceAddresses: Allow API on RO connection too
This API does not change domain state. However, we have a policy that an API talking to a guest agent requires RW access. But that happens only if source == VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -11546,7 +11546,8 @@ virDomainInterfaceAddresses(virDomainPtr dom,
|
||||
*ifaces = NULL;
|
||||
virCheckDomainReturn(dom, -1);
|
||||
virCheckNonNullArgGoto(ifaces, error);
|
||||
virCheckReadOnlyGoto(dom->conn->flags, error);
|
||||
if (source == VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT)
|
||||
virCheckReadOnlyGoto(dom->conn->flags, error);
|
||||
|
||||
if (dom->conn->driver->domainInterfaceAddresses) {
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user