提交 95c370f0 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 deb3e802
...@@ -11546,7 +11546,8 @@ virDomainInterfaceAddresses(virDomainPtr dom, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册