From nobody Sun Feb 8 22:17:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1609784470; cv=none; d=zohomail.com; s=zohoarc; b=BdCmx3rGAwjwJob0jLJ6hYb+J6YTJ2ImcBQvW2eleiPwPJ1WnoURVAM0e6OOtPjh+Mz2fl7nAZKDP7iswbErkqpE7/bIf7Se+pf8Yuv6Oxk/4BifFe5fguPwPHGIkqEvv2qWBCta8u2rOXVnhuk6v7bw9wDXsbR5tzdCge+5bYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609784470; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZmTHixoZIs9maHgvMeIOv6fYwxOV20KpeohVFw+EXLQ=; b=XEar2Yfpxxm19CgBip+fiWt+2iPrGWGANssfe0SClCsPA9VlNFFN7o1VM0T8963LQKJnKJ4ViMwMnWnBw5PG7DSKkb5YpHbbeyykCmzRNk0rnPCxT55JDRjHTYf4lHHp6aZrYkeyRPCPKmr4xtDAJhdkenTUnG2u75KpPbp7T5g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1609784470059490.75958957111266; Mon, 4 Jan 2021 10:21:10 -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-544-j_kNbEvnNoKxUgUla7E6CQ-1; Mon, 04 Jan 2021 13:21:06 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A5F815722; Mon, 4 Jan 2021 18:21:01 +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 0685D10016FB; Mon, 4 Jan 2021 18:21:01 +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 C5F921809CA1; Mon, 4 Jan 2021 18:21:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 104IKtxc018200 for ; Mon, 4 Jan 2021 13:20:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 73C6561F49; Mon, 4 Jan 2021 18:20:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id E908D61F47 for ; Mon, 4 Jan 2021 18:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609784468; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZmTHixoZIs9maHgvMeIOv6fYwxOV20KpeohVFw+EXLQ=; b=VOR+dW7XjBdQV+/l2564zkEYaOp6TDn6uWtmMeXpJyD7FpB32AtfoTo5oRtgoyPcQ/uMgu 3BHmyviRkUK+nAEtYVt9psbDMa3sGQ0V3SjXEMK+SzS3kDsI+jaHfLhWbajc3YD2PPU97F /KIudwqtdSKtY+juo5NurqMam++PWGI= X-MC-Unique: j_kNbEvnNoKxUgUla7E6CQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/5] qemu: Fix retval if ACL check fails in qemuNodeGetSecurityModel Date: Mon, 4 Jan 2021 19:20:43 +0100 Message-Id: <8d98a684f55589784a7cf084a723d767d677f597.1609784319.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.84 on 10.5.11.22 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" While previously we returned 0 this is not correct. We have to return a negative value to indicate error. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 96ec84bd1c..88324945ef 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5935,7 +5935,7 @@ static int qemuNodeGetSecurityModel(virConnectPtr con= n, memset(secmodel, 0, sizeof(*secmodel)); =20 if (virNodeGetSecurityModelEnsureACL(conn) < 0) - return 0; + return -1; =20 /* We treat no driver as success, but simply return no data in *secmod= el */ if (!(caps =3D virQEMUDriverGetCapabilities(driver, false)) || --=20 2.26.2