From nobody Sun Feb 8 11:25:54 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=1569271504; cv=none; d=zoho.com; s=zohoarc; b=j2kV26ilRX7KJ0uiQYGF47/+e/uFt0beuVLsqQ80rc65gNI7lgCf4D8O2PoOwT8BYK0CyP7GJ3SLu6ElWptSWlaT60o8H9QRQByDQhtLn8d49xPaHpN/9veB4er06AfdRVww1b6t+txngjOjMcPjfhC58b4iPqmlKgYg+fbbEQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569271504; 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=FWbHi1HWkC+gNzece05Dpek3kY294OOKK0EF/fCPpXA=; b=GdFs41oVWMJ1kYuDNC8xKMD0YkwWkmjVvVCcvzZP7OYHYXfmDpFbMasGOFrLra7Of9QL6NKfqBpr8K4eiT2lYVSQKbsFTrNO5qTMFh9R+tL+mGI24azzAzixNA+z3yx6V3TpbKo9VJZLtK5ODiVdhGFO5GrewtuQ+bJoCnU/BIo= 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 1569271504536439.33762997560973; Mon, 23 Sep 2019 13:45:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB65D7FDE9; Mon, 23 Sep 2019 20:45:02 +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 6AB72196AE; Mon, 23 Sep 2019 20:45: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 BE6D14E9F2; Mon, 23 Sep 2019 20:45:01 +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 x8NKigUV031639 for ; Mon, 23 Sep 2019 16:44:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 675236046B; Mon, 23 Sep 2019 20:44:42 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A7EB601A2; Mon, 23 Sep 2019 20:44:42 +0000 (UTC) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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 BF45C308FB9D; Mon, 23 Sep 2019 20:44:41 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id n7so18864370qtb.6; Mon, 23 Sep 2019 13:44:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 13:44:40 -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=MdwUhcEZaamVOHXrzW/zyFZIP1ktgOilvenvwCcgh88=; b=bupsViWJWawviHDfe57z+0sLxICYu1Zy8tiYCQPz3Sd1JjWtwQvhH0TkIcp9tTjGPV /ENky/I3qeQufY20cL5vhyRn/lZYI3ZrQISktAPMXfxEFhL/1kIQZQotOWJhtuohx6IM WnUpLnzDS4VrAwJge/elP4boVSr8XiGVff8PTc6lleNtqXdrPmzwDibfoEttIcozkQSj cvA0nGMYIrDmefmUd3lYUTKgCLeoVbjpIeuan/pyYlrPuVucI1Fg6w/7r+ovc1chu5ck IAKZx3q6s/cIfcepSqvBN7M6k5DnBOBWLliCz0R+IYv/BYTtETPDDB1bLWe+T78Nl+E/ PSfw== 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=MdwUhcEZaamVOHXrzW/zyFZIP1ktgOilvenvwCcgh88=; b=giuCZSk9TACK2sMi0v13VeqxcSxF+HrrztTQbUolAVwI1gCKFqKLYyygcsnq/cqxwb li85e5WScw3RybDwGUNntofSEXNtUn1I9k24eRz0UCS0b2AsuE/CQH+RABzzEgQokByB JMhK4CaxZEtdyuz2k+NofTaF8ZTJsfQ0XPF9scApTZCWkpBZB7EXF0p9FPvvpVVQxbIh 0f7ng43LltstJBs/tqPVr9oObYKHaSUIo2SPKQfUBLBLqCCnSi/N/Q/MGcnc0zHv6MFF yX1CssQtV7n4vbpP6Yzg048i5hLYzns6UvAFFXV2FSN7yKf7qn83QSXcsiNIBh3qFlRR KZ5A== X-Gm-Message-State: APjAAAWl9ui+0rgIgj1U7Hu3+VsHFGQFloj9PE2nZdMKzOxD3tstaYoY gGDHAKXBkahr1xqJnNjVrn3DvUqT X-Google-Smtp-Source: APXvYqzjq5v48sDDQfGAtsEd5YDi/Iw0/Kt2s5uBl33q0UgbsxgErsZeoeiXY6DheLiMvSYlJgbqOw== X-Received: by 2002:ac8:710b:: with SMTP id z11mr2116899qto.372.1569271480974; Mon, 23 Sep 2019 13:44:40 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 17:44:16 -0300 Message-Id: <20190923204423.23824-5-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.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 23 Sep 2019 20:44:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 23 Sep 2019 20:44:41 +0000 (UTC) for IP:'209.85.160.180' DOMAIN:'mail-qt1-f180.google.com' HELO:'mail-qt1-f180.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.180 mail-qt1-f180.google.com 209.85.160.180 mail-qt1-f180.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 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 04/11] bridge_driver.c: 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 23 Sep 2019 20:45: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/network/bridge_driver.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index c54be96407..c617bbb58f 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -938,21 +938,10 @@ networkConnectOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } =20 - if (network_driver->privileged) { - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected network URI path '%s', try networ= k:///system"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected network URI path '%s', try networ= k:///session"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, + "network", + network_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