From nobody Sat Feb 7 18:46:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1575299027; cv=none; d=zohomail.com; s=zohoarc; b=Ylw+ljJiKNZwMvHXb3S3gxj6CB13/brFiTkpQmMX+QYBQ88WCCCULv6XG3gTO8y28SccVgPmyamxVFVuYRM+Wdf8B2xzul7b5tfEfBg3rBYajmKQ5ESvqwmQJGu552a26PXeoSXEKKj7LtFOPKpr8063j8tqySkwK0Wv1aceNtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575299027; 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=GkVRljihpMomkqhhMQcfKWCLp6370NRIZVyVzVnFapo=; b=NPnGyUFtxV+mNpiSS7FHJgIluNe9KsjBVXEsHmYUd8aM2BU1cKwgJPX+6wEUaYOycmUUbZ/QyXmGmVz7F0zEXTXmtKXfMhS5Emz1h2RqTD0FEiKcfGwDFFj1Au0XW1L3/P4mABDn5kZrjbMEynpls6X6Mnjwt3W5x4u1gmw/Ucw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575299027951342.5026568200294; Mon, 2 Dec 2019 07:03: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-229-vzbd3qI4No-jXHYmF1rTMg-1; Mon, 02 Dec 2019 10:03:45 -0500 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 7D61E107ACC7; Mon, 2 Dec 2019 15:03:39 +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 340045DA75; Mon, 2 Dec 2019 15:03:39 +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 B69021803C37; Mon, 2 Dec 2019 15:03:37 +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 xB2F3aNf030564 for ; Mon, 2 Dec 2019 10:03:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 56C19600CA; Mon, 2 Dec 2019 15:03:36 +0000 (UTC) Received: from dhcp-16-105.lcy.redhat.com (unknown [10.42.16.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id C97CF600C9; Mon, 2 Dec 2019 15:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575299026; 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=GkVRljihpMomkqhhMQcfKWCLp6370NRIZVyVzVnFapo=; b=Tva4BnAqaxRqiPDdeHkmHDSucE2H2qO1nlsOPHhit5a40RkIFRHUPH3FFhpH282j7G0/WX H8AEQQFnrnP0ZTo1DxXbTfI4bR3AJxTK6KhDirKUMkwwwXy93+jNNT1oylM+oIg5dUpxqO UrHeqJVJDmhb1uj8XmE9+can39Aarb8= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 2 Dec 2019 15:03:25 +0000 Message-Id: <20191202150331.173475-2-berrange@redhat.com> In-Reply-To: <20191202150331.173475-1-berrange@redhat.com> References: <20191202150331.173475-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/7] access: report an error if no access manager is present 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-MC-Unique: vzbd3qI4No-jXHYmF1rTMg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The code calling this method expects it to have reported an error on failure. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Cole Robinson --- src/access/viraccessmanager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c index 31e1787919..f4120c6139 100644 --- a/src/access/viraccessmanager.c +++ b/src/access/viraccessmanager.c @@ -65,6 +65,11 @@ VIR_ONCE_GLOBAL_INIT(virAccessManager); =20 virAccessManagerPtr virAccessManagerGetDefault(void) { + if (virAccessManagerDefault =3D=3D NULL) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("No access manager registered")); + return NULL; + } return virObjectRef(virAccessManagerDefault); } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list