From nobody Sun Feb 8 07:49:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584715512; cv=none; d=zohomail.com; s=zohoarc; b=DAV9OZXOQPVurH+9+FUKg1jI3LoBoOXXTs9sQyaYrYlugFA+UWNHa7ENG9oZrlxVUsUz3Wzhf/g0JLJFzPr23/hkEyM20snMTl4iioYHLR3+sWBZuGArMrORVlQvCtm3B+iiDrcFwrO4TY6/xvsPVQjmdkvoMPlzXfziZNRfYeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584715512; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nIwJFdUYGV3p1u6J4VnfVYWOeTlELDAv4dgl/fLuALA=; b=BdrLD8GRKpad2Ooz19qnXBT0YrkzPymbFfP0vru/WJV56yZ+19Q1gJ0Sb7lT1HDEbca28qpQsPFnbLbEQIDM9qFXN4jZQUltLtCGyuJdzft+/FoUWdBxBcDpskgDxMVJA9FcCj6ktqs0VUyWt4tWCIwJrzvX1tkz69DcdeKqAgo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1584715512794963.0464050591588; Fri, 20 Mar 2020 07:45:12 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-QfMGbmmOO6-V-Zwbf2gkyg-1; Fri, 20 Mar 2020 10:45:08 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FA95190D35B; Fri, 20 Mar 2020 14:44:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76AD15DA7C; Fri, 20 Mar 2020 14:44:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 685E618089C8; Fri, 20 Mar 2020 14:44:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02KEhGK0022802 for ; Fri, 20 Mar 2020 10:43:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8755EBBBC0; Fri, 20 Mar 2020 14:43:16 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-112-119.phx2.redhat.com [10.3.112.119]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 567FC5C1AF for ; Fri, 20 Mar 2020 14:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584715510; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nIwJFdUYGV3p1u6J4VnfVYWOeTlELDAv4dgl/fLuALA=; b=X/dpn4orxWy9N6LsM87Z++9qKClR8OccauoZ0hN4zmQSsGsrnqCQt1Eyh1cDznGsjbIXi+ 7Q5NWMvH645Fc9W9J+B9egqeqymn3MOpFn55pvithydoNrKjLBrinSaRPAGB51c6xSufjt HQ7UhhPKVSzcsF5i0vyICfL0qvYtsw4= X-MC-Unique: QfMGbmmOO6-V-Zwbf2gkyg-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH] api: disallow virDomainAgentSetResponseTimeout() on read-only connections Date: Fri, 20 Mar 2020 09:43:13 -0500 Message-Id: <20200320144313.16817-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Daniel Henrique Barboza --- 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 domai= n, virCheckDomainReturn(domain, -1); conn =3D domain->conn; =20 + virCheckReadOnlyGoto(conn->flags, error); + if (conn->driver->domainAgentSetResponseTimeout) { if (conn->driver->domainAgentSetResponseTimeout(domain, timeout, f= lags) < 0) goto error; --=20 2.21.1