From nobody Sun Feb 8 04:11:34 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=1569509836; cv=none; d=zoho.com; s=zohoarc; b=Q7vAeBd8MYkWNqesXeScJr4AXNWSAhY/Q6wjh0Q56NjjJcfYBTzD8/t8EDyMMR6WtXEWS/aeuVckHI0xgTFSy5FVZ2Lwg1mmZKUISwIYv6AY5q1OH5BQZ138YfLcpQGsDnpVQkDmQ52xTBOaHn9awDqDE4M7gvmDnCR3TlWAFic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569509836; 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=9wvoqlVr1WauJHXITZYemGaTgWR5pdM0V3Ofbm3gefM=; b=R2P5+4q55/7LbFD0yyus0jF590NTCwqIeMhxwf3tIaID9R3N/eHLUXJtXLNDwsV3st4r+OalrNh1sLg0TL63JTUPXDuHwoQ13Y6n0TThq1siDsP6a/rskm90R3ExixzbsOu7FPNb7r7WBz9om0OALHNtmCHQuaHrI7FTIbLMItk= 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 1569509836292519.3144776943075; Thu, 26 Sep 2019 07:57:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 640DD308427D; Thu, 26 Sep 2019 14:57: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 3DB4860923; Thu, 26 Sep 2019 14:57: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 C8E18206CD; Thu, 26 Sep 2019 14:57: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 x8QEvCEg028832 for ; Thu, 26 Sep 2019 10:57:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4B22360126; Thu, 26 Sep 2019 14:57:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx22.extmail.prod.ext.phx2.redhat.com [10.5.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40A46600C6; Thu, 26 Sep 2019 14:57:12 +0000 (UTC) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 9B4D218CB8FA; Thu, 26 Sep 2019 14:57:11 +0000 (UTC) Received: by mail-qt1-f173.google.com with SMTP id n7so3213740qtb.6; Thu, 26 Sep 2019 07:57:11 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:cd57:9a0c:bf:55c8:50dd]) by smtp.gmail.com with ESMTPSA id x12sm1346543qtb.32.2019.09.26.07.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 07:57:10 -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=+ZuapLMy6DwB4tMQxPFSqg+x78BNIak0EuVFqMCNH/Y=; b=k0Hww2Q9OVOaiwAzhL65HhlRKd5eWIUo3M4J9o7WOxPxmtGPgK91xibtSg7Q326aqX XxTtZfkbOdXb09c1Mcys1dX4D5RpqsK1yqiPkIoueFBTPoNmdiwu75Vi2UYG42TZuV+g C+wxJ2A541iY/dI9SEqQM/xBPv446afNj9kRJ+/JBS6HGgpFEjjZVYuxWx+KrfMkdcsb 26wsj/RReozdCQR1me/swKhkZ+nE6BePC/35HnhxnLR1s9lw1+6Xq8NMO/nhz492mYzv NgQFlu2+C+8k/XowfEC2HSsN+IR4xuTduZnMSMaPlRAuwJxs7YkRTP6jm12GW6bv9ET8 HcEA== 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=+ZuapLMy6DwB4tMQxPFSqg+x78BNIak0EuVFqMCNH/Y=; b=Bz9hFCS8DvlfFDmPbg9XNlB1vyasugfjaFZ8aW7URObYaScMovst0cGx4ES5rBclhD Ki3a6oGd6L4u4WjZcopENlhZSpZi5WUx1u2qgYkwDNis99KP44VEUGn2QIEMDeXQjk2i Cl3quhJ9Oq8WxfjGAJiDIoG6lulE4vLZXAWtgZXVXDm+/uhzX2PLgEAa06//lPFgeJKe z+6u033cS7mIE9ReWTcEV+BF8VGeNld10n7GbmkYqgKHvmhjEXMs/u7C0RZylDHiy5dt 7kguzOe4OdsnfSiUX7kn5GykyK2qfsoysMJRj1sg7htplMtLpBvt4+X6T3Jy9EJQ+U+p bwcA== X-Gm-Message-State: APjAAAWRnRgtK4Q9x9sYuTs9Om5mCJZ8/kx2O9Jke9yodDxjhocF3LLX +kMJlW27U9Xupas9LRCQpbBu/bDAi/A= X-Google-Smtp-Source: APXvYqw/fGmL8ColWhX/ogH9Qp7JS8yLYXf8sejvrpRzWo5lctklDT5rShpsRLy0z4zDKGIkSrMnBw== X-Received: by 2002:ac8:2dd8:: with SMTP id q24mr4380451qta.118.1569509830806; Thu, 26 Sep 2019 07:57:10 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Thu, 26 Sep 2019 11:56:41 -0300 Message-Id: <20190926145647.3478-7-danielhb413@gmail.com> In-Reply-To: <20190926145647.3478-1-danielhb413@gmail.com> References: <20190926145647.3478-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Thu, 26 Sep 2019 14:57:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Thu, 26 Sep 2019 14:57:11 +0000 (UTC) for IP:'209.85.160.173' DOMAIN:'mail-qt1-f173.google.com' HELO:'mail-qt1-f173.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.153 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS) 209.85.160.173 mail-qt1-f173.google.com 209.85.160.173 mail-qt1-f173.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.63 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v4 06/12] 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 26 Sep 2019 14:57: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 | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 7512a51c74..ed3bd3c751 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -552,21 +552,10 @@ 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->privileged)) + 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