From nobody Sun Feb 8 05:26:59 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=1569247465; cv=none; d=zoho.com; s=zohoarc; b=F9qTK4Y96G+zsSUr+T4G6JJeL+X62BdIBLMrEk6YpxS41I+jtCXFCk/jzT7Sle8Bd0xb/ZSHCy9ZIUXKwVDSBPrbp6OEXKMlb3uQ5XRU1mV6N7S8nV3LKbaOgkbZqS0jfpLDgmcJhmfSSE6uZU599rT+1Ihx+/AW2sz9dEtU75M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247465; 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=p2+krng0JKFrbuQmoVADrgXLCVUyyZ2VHRM3iRYNeWQ=; b=aSaNQtNpw4rkoGQh/uGZTm8fosgqw+mcaoB+lKT4j3z+3h63VXLsnB6dnVXE7zOIBa4D84liwwCoxFr1D+vJN6oZjkeljHscCUBtxPicKtA2ngRqUTKKDnWBdCsAkw31sImdTt8lRawRzN6EAhq+oKtQsgHGmeKfmdMDawyhCWA= 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 15692474652721003.627486805842; Mon, 23 Sep 2019 07:04:25 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8678C3086211; Mon, 23 Sep 2019 14:04:23 +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 51CD010016EB; Mon, 23 Sep 2019 14:04:23 +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 EF9BE180B76F; Mon, 23 Sep 2019 14:04:22 +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 x8NE4Cxj006989 for ; Mon, 23 Sep 2019 10:04:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 99CE019D70; Mon, 23 Sep 2019 14:04:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B6F719C78; Mon, 23 Sep 2019 14:04:10 +0000 (UTC) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 80740C01D36C; Mon, 23 Sep 2019 14:04:09 +0000 (UTC) Received: by mail-qk1-f171.google.com with SMTP id u184so15508669qkd.4; Mon, 23 Sep 2019 07:04:09 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:04:08 -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=40wZH2hs5BiqgK1rDcI8VLjlhb88medP/gEKtO2yEdc=; b=eavAuFuYrbnYSfAQsnS6q9IqmyZ7xmNE04MBw/8uTFkNOFlMSvMv0uq0dpoQ4qN6nV fkiGaEwmiNFqPhiJlRFb7Q3jU1a+rPF7ORdQv32B461YT5lIXsRyDGkHt2byh+cfZJKo sgWaVMS7ybn5RmbFhbtPn6zmuDCDyhwYEwZ/wqTzpnAD1E0YPWpjj6EZQIr0/RBQEZUE 4je7qmkuLcK0M1T9TpUU8lkBzLQFR+aSGIMl15ZIvUobq4KMzOMwXwIjNDWFKcn7bLj9 bd1SEzF4/qB8a/PzJ7yj2Uqs3haHyRos0rPU1AlwE/enDLMBewQOeyXQs6aED6ZgHEFB zLRw== 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=40wZH2hs5BiqgK1rDcI8VLjlhb88medP/gEKtO2yEdc=; b=QmE4Dlbm1ID3/7u7jhmLQvGO3UaJ5FS53dGspfcFledD/GSvHYqbZn1NLd5dHlSNsr zEsClDIKZtFpzuT/QM1qDZhh7lY/tFx7AdaY3qApYHErEpfCWy92xynAyOp+bcokrqLA xWUBZkNhMxDuIHdI3PORp0OaefbI3UZmQrnbjK9l6MPZrdsmj4b8xAFxIc/roeniM6+C Sr4YCdZxgjLU+iRRRMck8WSvR1LmmFWiG5kgkXgHZUJZteohP64GaNxZb0FKWTbT7nqb +sbe5EQXrfW69F4Zg8EOmrORcNz0TRMNO2LvYyle+wYUo5bljALK41WzxqBPc8os3N1U VLoQ== X-Gm-Message-State: APjAAAUwcKcfqfM32euUKaqgSrx3lF76Jo523uMvV6U97h+eFKQWTyxJ s8ga8LdwY4G/fWeGYl7yN8zXUkPQ X-Google-Smtp-Source: APXvYqyhwOWRtOBm+3qp7XIkY+aK7YVlJvyxlG2t88BYcWgqmWuyTz2XcGxReX75l1P4SoFtJKeQpw== X-Received: by 2002:a37:7403:: with SMTP id p3mr16184576qkc.366.1569247448514; Mon, 23 Sep 2019 07:04:08 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:40 -0300 Message-Id: <20190923140343.1950-8-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.31]); Mon, 23 Sep 2019 14:04:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 23 Sep 2019 14:04:09 +0000 (UTC) for IP:'209.85.222.171' DOMAIN:'mail-qk1-f171.google.com' HELO:'mail-qk1-f171.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.171 mail-qk1-f171.google.com 209.85.222.171 mail-qk1-f171.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 07/10] storage_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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 23 Sep 2019 14:04:24 +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/storage/storage_driver.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ce10b55ed0..1bec2d964f 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -411,21 +411,8 @@ storageConnectOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } =20 - if (driver->privileged) { - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected storage URI path '%s', try storag= e:///system"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected storage URI path '%s', try storag= e:///session"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, "storage", driver->pri= vileged)) + 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