From nobody Sun Apr 28 18:02:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1614945707; cv=none; d=zohomail.com; s=zohoarc; b=UCwO8psN5BmM/XnE6Xtekq6638nEwWN3KPDG8IU1DohUdGjzoI3JLZxMThZuk86l9nAq14Fx4Pz5J8W07VxTpIj3bMkvBgQl3osvLv5li91mGnxHdkr4za9jAyjNFQTgJVQRm1c6RucT137/5QbyD9XMFa1CgzwPhh9eoRmWDWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614945707; 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=OfKivnnPQdrppk6NhAABFWejbZFZ9soePqjAdLVKMhk=; b=IhDiuHQ1vI1iEWev6totHppWuyYPbEJWEF+01GHrtMn2sGjY1QgVAW+d5fBVnsYyMRXxy14P+2glgDM6zBbDHzP212hXDydiclZnOfvIRM18zzbsaFyYmiyGkTQQMioBaVUq9J59b22nXBNoQkvlOIyaodSNqQ3tEtRS4qoZpRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614945707015136.85104286295848; Fri, 5 Mar 2021 04:01:47 -0800 (PST) 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-243-3SknX8zHMGePI_2RGqbSww-1; Fri, 05 Mar 2021 07:01:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 296651966337; Fri, 5 Mar 2021 12:01:37 +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 D5EB11349A; Fri, 5 Mar 2021 12:01:35 +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 B7A361809C86; Fri, 5 Mar 2021 12:01:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 125C1V3x017268 for ; Fri, 5 Mar 2021 07:01:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 44E5B189B6; Fri, 5 Mar 2021 12:01:31 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.192.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4CC269FA0 for ; Fri, 5 Mar 2021 12:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614945706; 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=OfKivnnPQdrppk6NhAABFWejbZFZ9soePqjAdLVKMhk=; b=gLhHhJ48n1IgrbSgzVgz20voE4aG0yaYDDwcB0EygHXLMSE+6cDP4MLyf6Va/Cvu+lDo90 3xevgXs8YScr8Z0F1WMCXUd6mjRRcPEvNQrQAU8kMt0Zu339ua+EuReG4VlMGKxOZSlro4 szyTiBitLCsDO+aAapRY8ooHIh0uops= X-MC-Unique: 3SknX8zHMGePI_2RGqbSww-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] XML validate that 'ramfb' has no address Date: Fri, 5 Mar 2021 13:01:21 +0100 Message-Id: <4ebe81bd19d9cfdd5343406bce31cb811a378582.1614945619.git.khanicov@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" With this, XML fails if config video type 'ramfb' contains address, since address is not supported for 'ramfb' video devices. Previously it didn't raise error. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1891416 Signed-off-by: Kristina Hanicova Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_validate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index b4e09e21fe..c9c677ddf5 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -151,6 +151,14 @@ virDomainVideoDefValidate(const virDomainVideoDef *vid= eo, } } =20 + if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_RAMFB) { + if (video->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("address not supported for video type ramfb")= ); + return -1; + } + } + return 0; } =20 --=20 2.29.2