提交 4cc90c2e 编写于 作者: J Jonathon Jongsma 提交者: Michal Privoznik

api: disallow virDomainAgentSetResponseTimeout() on read-only connections

This function changes the amount of time that libvirt waits for a
response from the guest agent for all guest agent commands. Since this
is a configuration change, it should not be allowed on read-only
connections.
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d9605abe
...@@ -12576,6 +12576,8 @@ virDomainAgentSetResponseTimeout(virDomainPtr domain, ...@@ -12576,6 +12576,8 @@ virDomainAgentSetResponseTimeout(virDomainPtr domain,
virCheckDomainReturn(domain, -1); virCheckDomainReturn(domain, -1);
conn = domain->conn; conn = domain->conn;
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainAgentSetResponseTimeout) { if (conn->driver->domainAgentSetResponseTimeout) {
if (conn->driver->domainAgentSetResponseTimeout(domain, timeout, flags) < 0) if (conn->driver->domainAgentSetResponseTimeout(domain, timeout, flags) < 0)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册