From nobody Sun Feb 8 06:54:43 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=1569247473; cv=none; d=zoho.com; s=zohoarc; b=HJUyTkY3Ec5wZLeivl4SNRGzgMkq2VBSaRALlnYXE+V+ogf96cOi2Gy9thDHvi1vRY+yrx6eHuzoq243pJWvOK4TXiKgnk/iJE2MQ9g++zkLWfog8FM5/1cQnu/IsO1fkeKi8PPmRw1ttlwbAyn3/kHMmLcOGXfmR7KaOd3wbCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247473; 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=3NTsbYQxk4el03Rp4fvmpqmwvFgeQC9ZcwJExMCFtxM=; b=JdkqI84T2u2dIrwoI2KEx1ogXLkHkRTW7uFzU4W8leT19ExGFxfNjGLMmowXUCEN8hmiPlzl3AkYorB6z7vHLu/voeeL9pqlz8jFC4kPCXQnKNy2U1ngcTC1Q9IL2yrD0GwJ11fcJhXSsBwlFIR+MuFv3BQqrfuFBArxPbat3Jc= 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 1569247473513544.9330175179867; Mon, 23 Sep 2019 07:04:33 -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 02B0330821BF; Mon, 23 Sep 2019 14:04:32 +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 CFF751001B13; Mon, 23 Sep 2019 14:04:31 +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 913DE4EE6E; Mon, 23 Sep 2019 14:04:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8NE46I0006953 for ; Mon, 23 Sep 2019 10:04:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id B1C791001B12; Mon, 23 Sep 2019 14:04:06 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A906010013D9; Mon, 23 Sep 2019 14:04:06 +0000 (UTC) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 CB60CC057F2C; Mon, 23 Sep 2019 14:04:05 +0000 (UTC) Received: by mail-qt1-f181.google.com with SMTP id d2so17269047qtr.4; Mon, 23 Sep 2019 07:04:05 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:04:03 -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=9hZhSSJwCMNgdMo5WSNtMnuIDICXNQFFCEv0AFbcSHc=; b=HqdnqCejdc3fnFF8kM9BsHbu79Zh/5yER3EAGJlRSShuCBE31yeas0LMIwVJFdxq8m XrwJFub4D18ZBL2e7ILtbFnNVTImSSmXo5oJ48sUyF55mp6x2xQ+7nCk4N954l64pbXR 6j6w1PtRGofoH7GpVAZGYwlH5hr9iw1+SVi5OHvuxYcs1AH+WFYhkQ7tJfBTauM4fRWH ozrQRJoLFPAAh7gYbGq/YfUVL8cOy4Yy8IzFnwYd79dI3RfpHItl/cpilyqZ3ecqAzVT YgZ24lfPjpwpzOf/DQHjOVqheTkI2wQd0KtsKTgtWV9GVqO0v/iksKELo+bVnWfcK2e6 ARbw== 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=9hZhSSJwCMNgdMo5WSNtMnuIDICXNQFFCEv0AFbcSHc=; b=M5NWStOHYb2DP0+UpabpCLpUkmY6KSqtDuTCwrOpWaOYlW9HMhDnnY0rgDbbxK7Yaa A+EAZebRlfUpqGjjz5dQFAxKjnquNHpiAmaYNdow7RV9LLRUackNmaOu+EAPlipdS7Gp kWG/Ps2/Z7cEE/zSQOQ3VxDLf6u3dY2EkYEBwe0OXaaf2kRo9Eaz0EtOgEgbkqkOkVoF 4MvnKpsnqbeyC53NfSWPVze0LFA5abpiRj8fvm4+tQwDebeu6TK9vIGNS8zVaQ6MfLYY F91AAXgS4Xpg/3bq6MRdg/8dfwrFOCUPfzAiFn39lO7ptgGP7HX8acRpBmYU1pi8GeAq a54Q== X-Gm-Message-State: APjAAAXvCgHAjNg3HB6d0glVUHIfaMiS1U4l7Oak3+iyW0w9KXwkVfxs Z8P07/ZoWiLupzdTA/LiJR7iv4H4 X-Google-Smtp-Source: APXvYqxIXpd2GtBSx3iY2ITDd4Lx3kV8w7iNZ3mAoHaIHQUOAbxlbl8KaNGLapQjiEuBCp7Y4/dkYw== X-Received: by 2002:ac8:27fa:: with SMTP id x55mr23946qtx.241.1569247444645; Mon, 23 Sep 2019 07:04:04 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:38 -0300 Message-Id: <20190923140343.1950-6-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.32]); Mon, 23 Sep 2019 14:04:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 23 Sep 2019 14:04:05 +0000 (UTC) for IP:'209.85.160.181' DOMAIN:'mail-qt1-f181.google.com' HELO:'mail-qt1-f181.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.131 (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.181 mail-qt1-f181.google.com 209.85.160.181 mail-qt1-f181.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 05/10] node_device_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.47]); Mon, 23 Sep 2019 14:04:32 +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/node_device/node_device_driver.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 8fb00d0c86..06febacd96 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -58,21 +58,8 @@ nodeConnectOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } =20 - if (driver->privileged) { - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected nodedev URI path '%s', try nodede= v:///system"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected nodedev URI path '%s', try nodede= v:///session"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, "nodedev", 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