1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03: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:
Michal Privoznik 2016-01-11 12:48:30 +01:00
parent deb3e802de
commit 95c370f0ee

View File

@ -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;