From nobody Sun Feb 8 05:27:04 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1569247455; cv=none; d=zoho.com; s=zohoarc; b=bqZD+aB4LUiZXN2IyEy4aj8ESgA9CfH2831ujDWzbLQlMH7nN2Krb1W3BCmTkRgJ7EvDmAlTf+Yjw3Dr4YM8ZlR6G8jX6PdkhPqFZKTQ4ENOF6T2dbS20heXVPDF287dyW6KtxQr6tsw3mNVxqPB1FqBH0e044w+RHDtIUzm6XM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247455; 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=sXWNUBp4r+Wn7ycojGgz37L4G+cPk8qALjxuYjkc62Y=; b=Yzp5NC9uKEcwx/nMQvdrGOF815uBro/CQo2i66nmas+cReTaihbS3c+1BlquRZwD9W/9c1JY4SFBl8OZrJG3DuFwce+p7HBnk9miV8C4FVh9LzuXYvlUq0h21hn+B0/hwXde2djlJmBCCCkzTZREEYwcbIsK8r5uNpGr7xsYIP0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1569247455683433.7247169544331; Mon, 23 Sep 2019 07:04:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4600618C4274; Mon, 23 Sep 2019 14:04:14 +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 0F1FA5D717; Mon, 23 Sep 2019 14:04:14 +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 A54144E9F5; Mon, 23 Sep 2019 14:04:13 +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 x8NE48OD006969 for ; Mon, 23 Sep 2019 10:04:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id E95D4601A2; Mon, 23 Sep 2019 14:04:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E05C060166; Mon, 23 Sep 2019 14:04:08 +0000 (UTC) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C22BE81DFF; Mon, 23 Sep 2019 14:04:07 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id 3so14802145qta.1; Mon, 23 Sep 2019 07:04:07 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:df05:2a1f:6ce3:83c3:51c0]) by smtp.gmail.com with ESMTPSA id o124sm5298435qke.66.2019.09.23.07.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J90cgyf4d1cl08U2Bh1dSZucwFfuTilNBe52PDKC94k=; b=VVLN9mxmMdL9VvCBSuBriNdHxJv/vdiqwl8oYw0X4AKq4LPd9RkGY2R52oT2Iz0RDQ iFBh99L9GCUn5mK/YYIJbDhha3drY9nmPWUXjYhOS8Zb8h5yb9sDapq0reP9ZcOzdvtw a/3F/rY0x7WNuv96siWjPwZfRelCbIhhGPmSMrbtq1ciOulADr6ru9sgsePLDSvdD1Nz iSpM7Xs+7rdeb7M9NKQCpo+6pvaXVs1VfJrmkzDxpLoSbzYloYTe7JzZvL/ygRxlI2Kr +0Leehdc2B/XwhyWfSUkPXCXlKYyb3CQYjcgMYoWphKLJJ7cQLpF0iUBsuNAnplCPDNd lIlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J90cgyf4d1cl08U2Bh1dSZucwFfuTilNBe52PDKC94k=; b=nEE/ypqUU1DIzGMR6QWAaU/cr+SJM0/DXJYRTpdZloNmwTHdNSLrCk+rLRtJ5IM25P YqYNeCTejTtQR62zB/jXUQu3RccWFEMUAhWIecv4CHYG56uIRauKk6KkYVVoQ/U3Q3g7 BwGPePbYXHxYKXAzC/NOg9oX/qaCCxkh7Ws83lBMO39zS4B3vT3SOm2HiAzJUZATim6x b889r3OzWJlDdJ1gT97Ku99Nbvub1oSWSzfEVbykyRhmyvt161ArL8zigjj9VhupM8d2 f02Reg8pM3cO/qucrEvnSJn8geuAmXtoMoZo9UdlX6FCZNlfevTORokECuc0M3sGsnU2 zT2Q== X-Gm-Message-State: APjAAAVkvzDsfMfdJtbtL+uPNeg3tj7AqjLQpFevTnYvGI722S/qwgJp ZvmnKFkNSitA4HczGHxSkCbKJswN X-Google-Smtp-Source: APXvYqy/+JOAToNlWIctq3x3W067Clsj0lypJIjQk0SMfb5Jhuk7rZhJKVXIlYxxGRZ2/AK/8LhZdw== X-Received: by 2002:a0c:bc15:: with SMTP id j21mr24729372qvg.234.1569247446713; Mon, 23 Sep 2019 07:04:06 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:39 -0300 Message-Id: <20190923140343.1950-7-danielhb413@gmail.com> In-Reply-To: <20190923140343.1950-1-danielhb413@gmail.com> References: <20190923140343.1950-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 23 Sep 2019 14:04:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 23 Sep 2019 14:04:07 +0000 (UTC) for IP:'209.85.160.175' DOMAIN:'mail-qt1-f175.google.com' HELO:'mail-qt1-f175.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.15 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.160.175 mail-qt1-f175.google.com 209.85.160.175 mail-qt1-f175.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 06/10] secret_driver.c: use virConnectValidateURIPath() 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-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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Mon, 23 Sep 2019 14:04:14 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/secret/secret_driver.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 7512a51c74..07ba679541 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -552,21 +552,8 @@ secretConnectOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } =20 - if (driver->privileged) { - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret URI path '%s', try secret:= ///system"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected secret URI path '%s', try secret:= ///session"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, "secret", driver->priv= ileged)) + return VIR_DRV_OPEN_ERROR; =20 if (virConnectOpenEnsureACL(conn) < 0) return VIR_DRV_OPEN_ERROR; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list