From nobody Mon Feb 9 11:26: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=1569271500; cv=none; d=zoho.com; s=zohoarc; b=Z1VzF54EWc693gCQfooPV5m/RdAbvM4idkZu8qLZ9nl9GBHLVsMbes2bis80HOGSHwvWGx8M7MnsUNbR0MlLzXyO0m7IVxyPtbY68F4QWDT9sku9tI7QUSY2qKkoKN7ghFCuHqJoQLeijnGDkio50/7YDFiwCuT6qhnSuwER43k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569271500; 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=6pfZyo9epk/TYD13zwF8kB1GXxHpz0YIyzwnHaf+6lQ=; b=BDcIvfQPoSmyEXrnvdbrEw9IZOQkaGgE2RKHgmc5xHVon3pVs+K63j76UVeJ31HZbupjWAk+z4Ox0TurF1iID+wTMAWCO/1hYmF+sA3TfwimaJqhK5PNNflb2ygszAWIHzwHMWgnK5SR3nXBjuXqEe8vlZ/S9Bxo0GmXpXGY2Ao= 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 1569271500280635.8049369216212; Mon, 23 Sep 2019 13:45:00 -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 B9CA6C0718BD; Mon, 23 Sep 2019 20:44:58 +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 8A25B60471; Mon, 23 Sep 2019 20:44:58 +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 4C9684E58B; Mon, 23 Sep 2019 20:44:58 +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 x8NKielY031621 for ; Mon, 23 Sep 2019 16:44:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD20460BC1; Mon, 23 Sep 2019 20:44:39 +0000 (UTC) Received: from mx1.redhat.com (ext-mx30.extmail.prod.ext.phx2.redhat.com [10.5.110.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CAA84276; Mon, 23 Sep 2019 20:44:39 +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 4B8627F745; Mon, 23 Sep 2019 20:44:38 +0000 (UTC) Received: by mail-qt1-f181.google.com with SMTP id u22so18803248qtq.13; Mon, 23 Sep 2019 13:44:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 13:44:37 -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=UrwdspBLqztNDkQg90/pAV9VyHGMDXBUFxswlPI8FfY=; b=bwyoPC0SNmaiaC+5UVE1ppxHHsVQEt+h30on1Fi56zdKh59SBiBbJ1neRVVtq0lZxV GYHeFe/WK3U2WwRN7dbYQu6fWv12xsXLw14mh5+oLp3qRekVNETB2lt/EIkjCK2F+Nx1 MrgqqEAZtBgXUQyDU9lj1q/oujxXkKWkP4PJiP90OB0CbQJnt7k+0+18JvXZMoZLPgrv Hf3C9LTloqTzzCPlUkpeqk41ExCd1J+mh6YZrVzvJpZMXzG8aXzydYRP5W1v0q+LDxIT QCq9r1fsLCTN12MUj5RdpeP383Gg+gjP7jJeoV82LjYzmdLEiS/x7StFcVnstmQH87it V5HQ== 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=UrwdspBLqztNDkQg90/pAV9VyHGMDXBUFxswlPI8FfY=; b=hdOXrdPetAbVXcq5SAGqgq4ivOVn0bSOgo3FVEfYng/Sf2HE/WSX0sZ/24rhL2GWeL MFM5eGPqhB+Ir7EmOOOAZFO/O/fHBGOTCYKPmJyobQKxJwi4TtvlW06I/8nMm9EDOFTZ zRSBpF2bso6MSNO14XKZ4hABdpetxCbJyN5oT23NugZcpnKzKv63x9PQNs40lX29Y2Bv 2hs059e7ZHvYM1dq1fOp1+FR1duhe5wyqSSQCvaCuGhN6fqQlmriTAsXuRC8zijPh6JB adQmgP8sDA8s+6K7TOKnE4s5fvIssAw1+rfpFH2WKRifOR/SMNspHSmo143k7rMnqoU3 zL2Q== X-Gm-Message-State: APjAAAWl8MtyG8q2q5ECtKYZM78J16y9OjVO/9ueQLEwEO+DkpCMnoEO 1KsRQqqiJ8WW5WaZTQIHCTG3Jpvd X-Google-Smtp-Source: APXvYqzVxbAAaWvYiwT/VBMG00W1bGzELIHhTeln8H8vfIclEBkvQeonwAT5Z82wF9sOzlx3r17ndQ== X-Received: by 2002:a0c:f091:: with SMTP id g17mr1075549qvk.181.1569271477409; Mon, 23 Sep 2019 13:44:37 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 17:44:14 -0300 Message-Id: <20190923204423.23824-3-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.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 23 Sep 2019 20:44:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 23 Sep 2019 20:44:38 +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.84 on 10.5.110.71 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 02/11] interface_backend_netcf.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.31]); Mon, 23 Sep 2019 20:44:59 +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/interface/interface_backend_netcf.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interf= ace_backend_netcf.c index 9659e9fcf1..7fe8f230b6 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -200,21 +200,8 @@ netcfConnectOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } =20 - if (driver->privileged) { - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected interface URI path '%s', try inte= rface:///system"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected interface URI path '%s', try inte= rface:///session"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, "interface", driver->p= rivileged)) + 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