mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00: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:
parent
deb3e802de
commit
95c370f0ee
@ -11546,7 +11546,8 @@ virDomainInterfaceAddresses(virDomainPtr dom,
|
|||||||
*ifaces = NULL;
|
*ifaces = NULL;
|
||||||
virCheckDomainReturn(dom, -1);
|
virCheckDomainReturn(dom, -1);
|
||||||
virCheckNonNullArgGoto(ifaces, error);
|
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) {
|
if (dom->conn->driver->domainInterfaceAddresses) {
|
||||||
int ret;
|
int ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user