From nobody Mon Feb 9 17:57:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1576749967; cv=none; d=zohomail.com; s=zohoarc; b=ckk9vYesrx02v3K5qsGaGqAXQrplAD07UHKDb8zOPaXikPxZQjKdbNfG8wKaQXwdOqVKnhemtbWgj9+nLwnY9wqEjRINz6x/kRo6EzfsokccSQdEf+RVh0+9yCNEUoBZm4AHWqniEAnH4BbU4c3cQK30EqDX+al6Ajge8pl9spA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576749967; 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; bh=gwro7WZG/7B7UC28F6ljOSkWE7FufuaJ1CPnZ3QjnFs=; b=C3vPnZ2QQhNNqR4XsDLWpb2T8spYsd7EZyv12BQmx7pr6q5w6nVxOBHlYNI+sFXLf4Em3MAB5QPDoYrGdXUPPPLn5HspL0xnoqmPKpR6mQFOVG10+0kq0gTMBRMPJKVHQuEdaUCtC4OCts/cLmqQ06HNScBW5L+2ovt7rLjud5o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1576749967115518.9147018960558; Thu, 19 Dec 2019 02:06:07 -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-177-7jloAW5vObeSZx7sizLrPQ-1; Thu, 19 Dec 2019 05:05:51 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B737518FE871; Thu, 19 Dec 2019 10:05:41 +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 8CF0426E48; Thu, 19 Dec 2019 10:05:41 +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 4BE32827FD; Thu, 19 Dec 2019 10:05:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBJA5296010850 for ; Thu, 19 Dec 2019 05:05:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id E583126DF9; Thu, 19 Dec 2019 10:05:02 +0000 (UTC) Received: from laerte.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4280126E55; Thu, 19 Dec 2019 10:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576749965; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=gwro7WZG/7B7UC28F6ljOSkWE7FufuaJ1CPnZ3QjnFs=; b=IxbNcN7TEjE2C5OTHoNvas79r3Hy/n536dVk2z5GAU7g2ochCz5EaK+I9bpyH6SKb5kawz 6JinQlmkFq9iGWuiak/NpcVYoPGm9a1+oBW+COqEeCn3uOiLmNO4YtjaXVWIG201xlMzUI yB7VQ7JdF4ush+a0ButqX861C2jsr9E= From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= To: libvir-list@redhat.com Date: Thu, 19 Dec 2019 11:04:14 +0100 Message-Id: <20191219100447.210836-10-fidencio@redhat.com> In-Reply-To: <20191219100447.210836-1-fidencio@redhat.com> References: <20191219100447.210836-1-fidencio@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Subject: [libvirt] [PATCH 09/42] secret: Don't check the output of virGetUserConfigDirectory() 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.23 X-MC-Unique: 7jloAW5vObeSZx7sizLrPQ-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) virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fid=C3=AAncio Reviewed-by: J=C3=A1n Tomko --- src/secret/secret_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 93b4256450..cdc4b7dcf9 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -475,8 +475,7 @@ secretStateInitialize(bool privileged, g_autofree char *rundir =3D NULL; g_autofree char *cfgdir =3D NULL; =20 - if (!(cfgdir =3D virGetUserConfigDirectory())) - goto error; + cfgdir =3D virGetUserConfigDirectory(); driver->configDir =3D g_strdup_printf("%s/secrets/", cfgdir); =20 if (!(rundir =3D virGetUserRuntimeDirectory())) --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list