From nobody Mon Feb 9 17:57:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1576749953; cv=none; d=zohomail.com; s=zohoarc; b=Uk1TUmGhla+tWQcZuQ9XPw35XnpM2LiuemrNpN+qn624b5W2Zj7vbhcYtpvAhc2xQRMHrXL3wGtZJs0FEsdczo4C3VtqC/sLsAdRiXWebdj/+vErKNCkYET+C64WZQj3eh72UkwEBt/3poYFjqVXeVp0IRDeLkbKAkQOUsDKMgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576749953; 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=E1299o7zSRh2lYH8sOpf4azP3/NEi2vMoIErNaj6w/s=; b=I0Xwp4GwqikbZU5fR8dDgfoySf/nL5Xopil8P89h7/thJPsFy5BSqKmXySVcIAOt0puHB9zbFsvaHZZHlayroacIuiq6Nl1DzHHbvIO8wncwpjs9pg8ft/nzRZ4nf1mtt1K2YoCHBprLrDysmT9i6s55cVESgcLwg0KUa8S5FhY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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 [205.139.110.61]) by mx.zohomail.com with SMTPS id 1576749953078606.1147889475653; Thu, 19 Dec 2019 02:05:53 -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-436-2DAp7XMmPtaq5O0BzdGolQ-1; Thu, 19 Dec 2019 05:05:49 -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 622FF800053; Thu, 19 Dec 2019 10:05:44 +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 356761001902; Thu, 19 Dec 2019 10:05:44 +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 E12F38356E; Thu, 19 Dec 2019 10:05:43 +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 xBJA5OUG011030 for ; Thu, 19 Dec 2019 05:05:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5EBA526DF9; Thu, 19 Dec 2019 10:05:24 +0000 (UTC) Received: from laerte.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id B05C826E48; Thu, 19 Dec 2019 10:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576749951; 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=E1299o7zSRh2lYH8sOpf4azP3/NEi2vMoIErNaj6w/s=; b=eSOB1tro21TU8MB8czsWAvECibkbWJQYhH6QpBb/NE4adR0ACA1qoyTektlhQegS+e8Tu6 HZi65wQ3mhfGc2myBDm+SS8FUnx+Lpp/qvgPGhnlxsfdW3shUqmALVk10/bC4MGJokRjOi tTnNO6zx5/+8el3D4WnVCOBeh4cdlqI= From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= To: libvir-list@redhat.com Date: Thu, 19 Dec 2019 11:04:31 +0100 Message-Id: <20191219100447.210836-27-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 26/42] secret: Don't check the output of virGetUserRuntimeDirectory() 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 X-MC-Unique: 2DAp7XMmPtaq5O0BzdGolQ-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) virGetUserRuntimeDirectory() *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 cdc4b7dcf9..096672f114 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -478,8 +478,7 @@ secretStateInitialize(bool privileged, cfgdir =3D virGetUserConfigDirectory(); driver->configDir =3D g_strdup_printf("%s/secrets/", cfgdir); =20 - if (!(rundir =3D virGetUserRuntimeDirectory())) - goto error; + rundir =3D virGetUserRuntimeDirectory(); driver->stateDir =3D g_strdup_printf("%s/secrets/run", rundir); } =20 --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list