From nobody Sun Feb 8 05:27:04 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=1569247445; cv=none; d=zoho.com; s=zohoarc; b=ZnXevThNfCedQnr9cxXoM97MzjKgGdmRf1jRJTAeTVTXdWKzvlQ2O699WiOksW9t8zVOqH6TKcA3KoK21guBCHcBWdzXia3r/IY+Bi0BE1wh/ASHHCAXkaKPOshKYJhGLaMB3PEYSPpU+0JD5oYzZBJcsWaMJxGHHIZjPga7Sew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247445; 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=BWdUyn6ruwDHrqUcgI7A8djRksQJ8kT+PgVvdpjhH6IOX2cO5PEHEkqgAEGnwjhGPSl9JNYX66wtJnBA9LZhr+v8YH3NEzhBTsNGcIP9Ius3nrmjj4MRNYSgoo8fNjRv8QhCbucOmgkMllLTJZIupcqLTmclfE08nXzZK+ZlSrs= 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 1569247445280735.0587816638256; Mon, 23 Sep 2019 07:04:05 -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 BEE70C04B302; Mon, 23 Sep 2019 14:04:02 +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 957CE6012D; Mon, 23 Sep 2019 14:04:02 +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 1DD6F180B536; Mon, 23 Sep 2019 14:04:02 +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 x8NE40jf006921 for ; Mon, 23 Sep 2019 10:04:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7E8A91001B20; Mon, 23 Sep 2019 14:04:00 +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 26C6410016EB; Mon, 23 Sep 2019 14:03:59 +0000 (UTC) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 6EF6318CB8FE; Mon, 23 Sep 2019 14:03:58 +0000 (UTC) Received: by mail-qk1-f177.google.com with SMTP id p10so15466491qkg.8; Mon, 23 Sep 2019 07:03:58 -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.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:03:56 -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=a7j8tmwmGksU2KIh546+i+MyRUut5dfoGtrb0Ka/GKgV9ADn4NyGZQpZ7LYUUZlNvJ LFfjeNA714VSH0J8Y/u0z2gehyNQz1ic3XSBhQS2oX76QjWS8ifEGY+2CFaEzyke+GTH IPl0RU0Yd2sp53Pek7pA8T1ZEOv0M/I8CGZhBCG/5PvHKf4lfTrwFxmDf+N1ngqN0zk9 kq8YyoCEKlPwlD9vienGqpwUg34rGazZaM+EQFnARkaZQel6BXXVqekPhQUR8NWrYjVc C+N6STbBt7hNIcxtRkXVFZEr0Mk93gdgeXZ8oIcg4B6bu5ht9ZNzfkMqssmi39Wi7PG8 ABeQ== 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=gd6r1yHQTLD+3MQUtIehVqCSBwzCi55H/XZx4LKXSJE2eNJP65QAw40sMDQeAPlPS1 gErIGYrDkIJPMotp4y57HC9LtmQOfT3dwyyqNE48P4HIiJClBbWgzXjP/FhC6NBPHOCJ +KQqjIks5wdYVhCf4mQa4zEl09BNbhV0Z2pU7wRVkgZrTOJAvYmtqtgvFvB4bioGA7Aj dH5Y7KE+/sQzeB0IxGPxyuppXM4+c6F04FKCv4f87mgeWcEYuuCUEeFBKMg5kbIJO0P2 NdhPl4FIcSqZEt1zeMxiSZEewuSam1oh/z1CGc11OmmsNNiY5Rd+y3qiGNj80WWIEDkS qVLg== X-Gm-Message-State: APjAAAUMz7gUmHPSl8/opYCpYHnS7R97LNdAFSsRy5ascm3U84M/G//P BrPUl8tZ/zrMinPyp9DjNn0YK3jm X-Google-Smtp-Source: APXvYqwEp6vQzVwRbklvH3v1Sz+3TnJRqucn6YuMh8+q/0tPNnq5BpHip8Mst1W04ahxAfR2gZNYWw== X-Received: by 2002:a37:714:: with SMTP id 20mr17253120qkh.32.1569247437506; Mon, 23 Sep 2019 07:03:57 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:35 -0300 Message-Id: <20190923140343.1950-3-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.6.2 (mx1.redhat.com [10.5.110.63]); Mon, 23 Sep 2019 14:03:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Mon, 23 Sep 2019 14:03:58 +0000 (UTC) for IP:'209.85.222.177' DOMAIN:'mail-qk1-f177.google.com' HELO:'mail-qk1-f177.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.177 mail-qk1-f177.google.com 209.85.222.177 mail-qk1-f177.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.63 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 02/10] 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 14:04:03 +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