[libvirt PATCH] api: disallow virDomainAgentSetResponseTimeout() on read-only connections

Jonathon Jongsma posted 1 patch 2 weeks ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200320144313.16817-1-jjongsma@redhat.com
src/libvirt-domain.c | 2 ++
1 file changed, 2 insertions(+)

[libvirt PATCH] api: disallow virDomainAgentSetResponseTimeout() on read-only connections

Posted by Jonathon Jongsma 2 weeks ago
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: Jonathon Jongsma <jjongsma@redhat.com>
---
 src/libvirt-domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 65813b68cc..a12809c2d5 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -12576,6 +12576,8 @@ virDomainAgentSetResponseTimeout(virDomainPtr domain,
     virCheckDomainReturn(domain, -1);
     conn = domain->conn;
 
+    virCheckReadOnlyGoto(conn->flags, error);
+
     if (conn->driver->domainAgentSetResponseTimeout) {
         if (conn->driver->domainAgentSetResponseTimeout(domain, timeout, flags) < 0)
             goto error;
-- 
2.21.1

Re: [libvirt PATCH] api: disallow virDomainAgentSetResponseTimeout() on read-only connections

Posted by Daniel Henrique Barboza 2 weeks ago

On 3/20/20 11:43 AM, Jonathon Jongsma wrote:
> 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: Jonathon Jongsma <jjongsma@redhat.com>
> ---


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

Re: [libvirt PATCH] api: disallow virDomainAgentSetResponseTimeout() on read-only connections

Posted by Michal Prívozník 2 weeks ago
On 23. 3. 2020 12:37, Daniel Henrique Barboza wrote:
> 
> 
> On 3/20/20 11:43 AM, Jonathon Jongsma wrote:
>> 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: Jonathon Jongsma <jjongsma@redhat.com>
>> ---
> 
> 
> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> 

And how pushed.

Michal