[libvirt] [PATCH v2 1/2] virDomainInterfaceAddresses: Allow API on RO connection too
Daniel P. Berrange
berrange at redhat.com
Mon Jan 11 12:45:37 UTC 2016
On Mon, Jan 11, 2016 at 01:38:13PM +0100, Michal Privoznik wrote:
> 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 at redhat.com>
> ---
> src/libvirt-domain.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index 677a9ad..02fc4df 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -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;
ACK
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list