From nobody Mon Feb 9 11:26:44 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=1569271511; cv=none; d=zoho.com; s=zohoarc; b=ZdVmdYZ/DwLSBniXvq8Q9HPzOlLuBhOl/JbFzZfeQYU8jYcnPFA1k7lJVPFk4eDcjmsWqyi41iEW0j5N4COR8jbIaR71elWLikCmzuTTT3oaf/Sl7N2RBn3crrKUzEGHbjhbB1/euJd/IZQZ97nc/ccMh6iYEiA4IMD9xu3wWuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569271511; 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=Jd+jn3cHJ30ZLHoVBV7IwQSvkBcBCM3VAWwmrtq5r0PDTVet3gxT7HZ34vpMb3IEhMofQzotc8kVSoOOj/Tcz6YdOxh8rwGIe967mLSevZsIFVLtJis89qXVPVwp+RFouHvFbHv5M4ZrOHirYkOLbxTWnh62JQAG8LAyBJm/nQk= 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 1569271511754871.0030397578596; Mon, 23 Sep 2019 13:45:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B398309BDBA; Mon, 23 Sep 2019 20:45:09 +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 E545660471; Mon, 23 Sep 2019 20:45:08 +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 876E8180BA9D; Mon, 23 Sep 2019 20:45:08 +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 x8NKikmw031692 for ; Mon, 23 Sep 2019 16:44:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 101726017E; Mon, 23 Sep 2019 20:44:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 053F260461; Mon, 23 Sep 2019 20:44:46 +0000 (UTC) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 61E66308FB9D; Mon, 23 Sep 2019 20:44:45 +0000 (UTC) Received: by mail-qk1-f182.google.com with SMTP id p10so16919255qkg.8; Mon, 23 Sep 2019 13:44:45 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:df05:2a1f:6ce3:83c3:51c0]) by smtp.gmail.com with ESMTPSA id z13sm5343974qkj.34.2019.09.23.13.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 13:44:44 -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=ZqNFjxWFO1UrUzBGHr+7Hyu/qAUiQuBOE5m0ZP4uLGxm0RaRSybIZXGrQFB0rPHtCI YW7XSAqiUgH+5y2gyP1SCtsc6TOZB0LIcPmiEJTdHeMxPREXoiVmT3EkBfls38El2LKU 8Ro6F+FpTUJ7uz+iUeYkC6a+iX6Cubb28GYYhw5+unkHpP20wNE302/xs662s0owZJ7w YDkJhZoZN3PM0yaXX/x/u5PISvhug8LD7jTzpl5Owsev7ZSkyKkty69vMvHbsEcQqcnh qFbA2ewrY6dNmDQ0kKPVSdJs9FiEW7Rdm/6TsiXr6avrwRhhqiA1NRTvNmxfLV6bIZ3H rJGg== 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=NENNlkvpSYEjLzZU74dlbSXlIxmF5yMpndOI3ukhHVqM8wurV9oMUr1FP1a4AJSgmI ms2KkZIc4k2223PdMElFQDj8p0Pw4vIi+AViN0FgFgkFxSF5R80qzlErj7Rq8AaMdy+1 7tZ8GBJXyBh2EEYxBpUPBwlSVQRnIREfXiffVaqXviaD9xialsnij7ravTAWywfjHZg5 Pr5gPC4mJzs2RNuBQ6m5SXEgalBCnp/fgKd1NKL0wDfWgvtzRhG+/IVbmfh3iFOhWnp4 jRPwo5MWu30P1myqiJJUt/xBvbS/Yj874Y2v4e1mtm/ZyA2Uj2n9fPZvxYfCEU3BqXvA PwyA== X-Gm-Message-State: APjAAAV3cOlOvGx5HLr3r2xvfKp7S/VE9eakykNYLDGEghPLKEDJuao9 F2UD5pL9Ts6ms0tbirILJGWezZ/b X-Google-Smtp-Source: APXvYqzCs4/9xfyorN+8S/KKSNs3hMy+5anGc/48fX5vZjVALNeUkTEhd0DXj46T7NWtpeXha1H+Qg== X-Received: by 2002:a37:9c81:: with SMTP id f123mr2062906qke.66.1569271484608; Mon, 23 Sep 2019 13:44:44 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 17:44:18 -0300 Message-Id: <20190923204423.23824-7-danielhb413@gmail.com> In-Reply-To: <20190923204423.23824-1-danielhb413@gmail.com> References: <20190923204423.23824-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.43]); Mon, 23 Sep 2019 20:44:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 23 Sep 2019 20:44:45 +0000 (UTC) for IP:'209.85.222.182' DOMAIN:'mail-qk1-f182.google.com' HELO:'mail-qk1-f182.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.222.182 mail-qk1-f182.google.com 209.85.222.182 mail-qk1-f182.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v2 06/11] 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 23 Sep 2019 20:45:10 +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