From nobody Tue Feb 10 13:01:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1569235513; cv=none; d=zoho.com; s=zohoarc; b=n/uogEhsdu39RkAldQ8zuDuS98C4FoH94zafAXiZdnroMZatlYtfeh8gE6d5UHpq5rOjRawDt52F+0ZYhh4CE6/xa4Tq7SzfVjZXhuYbis/DxLg8hVC3D6XlwLCddL94O0WvYo68jVhg/3WrxF+Vdv0s/NEwZWYMotz1PfDHi4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569235513; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=L96KR4JleoJ3Lq3tXB5t4mBNtqI4bd82WXrVOhDLkFs=; b=OSx5VlWJ+PvmQ44jnKLheQ2SuqdoIrfkOdWCQqGNE/MmI7VhV0orv/rQzaYWTXpQ3d5O53NNTfo6nX7Y1+vf9bdmXeQsSDoBRSinfY/WV/ljHUJbo9wlLhjl5Guuum958toKBry2XOauHRbLlrxpUdZ+cp6tEvLB69Ix/wrBZSQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1569235513962784.154226938632; Mon, 23 Sep 2019 03:45:13 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8FEE02A09D3; Mon, 23 Sep 2019 10:45:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E3335D9E2; Mon, 23 Sep 2019 10:45:12 +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 106F34EA66; Mon, 23 Sep 2019 10:45:12 +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 x8NAjAlr025510 for ; Mon, 23 Sep 2019 06:45:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 374BE608C2; Mon, 23 Sep 2019 10:45:10 +0000 (UTC) Received: from localhost (ovpn-112-36.ams2.redhat.com [10.36.112.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0985B60933; Mon, 23 Sep 2019 10:45:08 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 14:44:25 +0400 Message-Id: <20190923104443.17931-3-marcandre.lureau@redhat.com> In-Reply-To: <20190923104443.17931-1-marcandre.lureau@redhat.com> References: <20190923104443.17931-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , jtomko@redhat.com Subject: [libvirt] [PATCH v5 02/20] qemu-interop: ignore non-readable directories 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 23 Sep 2019 10:45:13 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau Whether a directory is missing or is not readable doesn't make much difference when populating the available configs. This removes errors when firmare or vhost-user config is looked up from a user session libvirt if /etc/libvirt is not readable for ex. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_interop_config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_interop_config.c b/src/qemu/qemu_interop_config.c index 1f39d4b576..f3c5d2e083 100644 --- a/src/qemu/qemu_interop_config.c +++ b/src/qemu/qemu_interop_config.c @@ -41,8 +41,14 @@ qemuBuildFileList(virHashTablePtr files, const char *dir) int rc; int ret =3D -1; =20 - if ((rc =3D virDirOpenIfExists(&dirp, dir)) < 0) + if ((rc =3D virDirOpenIfExists(&dirp, dir)) < 0) { + /* silently ignore unreadable directories */ + if (virLastErrorIsSystemErrno(EACCES)) { + virResetLastError(); + return 0; + } return -1; + } =20 if (rc =3D=3D 0) return 0; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list