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=1569247451; cv=none; d=zoho.com; s=zohoarc; b=HTSQ3xbL2yfRfHBeR7Tu4W0/5v0qqQ2L+KM95HquANn+9tQIhpzMdfGqyv1w6d1fq5LrYjdRn3OW3xuj8Qt3RcKy/OL5KYmTDQ97dgTqJhw4Luznupd7w23CjpmVX8DvuqL0D+Z047Neeb7Ugr5cY45XBmrUFClMC7zXfpHk/Xc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247451; 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=Moz1BDERMtp+vWFKkcy8FjVbzsESAv4pfSntNSvjeVzpiGszC5KT7w4+kdTFc015ccoLv5VQ9wMYcDG7QpKh+xB3n5TlRy9v+Emvv6oxmL6ViSkb8EsnEWj+DRjQD3U9seMqm+DQZHfMwKtrvgnQSXyRKa/vZYZjHxCygzTUWcY= 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 1569247451625737.8441968642823; Mon, 23 Sep 2019 07:04:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 491D5800DF4; Mon, 23 Sep 2019 14:04:10 +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 1A32F5C207; Mon, 23 Sep 2019 14:04:10 +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 C93D2180B536; Mon, 23 Sep 2019 14:04:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8NE48wl006961 for ; Mon, 23 Sep 2019 10:04:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 33A595D9E2; Mon, 23 Sep 2019 14:04:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEAD05DD6C; Mon, 23 Sep 2019 14:04:04 +0000 (UTC) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (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 806CE30603AD; Mon, 23 Sep 2019 14:04:03 +0000 (UTC) Received: by mail-qt1-f172.google.com with SMTP id r5so17288645qtd.0; Mon, 23 Sep 2019 07:04:03 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:04:01 -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=UyB/nT5uiAsip5QnBoOUghV5zxDHaTLxsrUrzH4MdvY3tRPaEoFlERWwEN4OqCFdZP YG6OnPKZK0tbVWYn2wpTenNNxuF0VTizSsTJIYYNCWBCGoe4vVNBY06gkeCbLuH+j36P j8YjWl1D4Meuy+7abxjdWectNcStUjZwJa2SJIEFoS8oJVWe6dZk1hn0V62J6tl55ivd xyANrYicyQ3aMzc50e18lX5e59PPh1GkcvZYWdlsgK/wCIpnU9UtoE41k0jLwYFxlOPe iZeExxver1DhiT5FF6vsJBWCUXycvAO7ITNdVlkGrSk0O3htBClb5PGqO0AZwnnUnYQr kUfA== 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=J7cXk2mOxWNmddPH9EZYgJBb21rEETYkeDZG9TkVov2yxe6Nc+xFziloJ5zQXsX7P6 CuDqGw3goQPEZjmmNSX7/9fsEn5yabqaNNTsE/SAq6cU0NiInJSjQ+iT4OoaVS7yaACk X5vFbIDVmxiL3yQnAvTTF4gP3/xMItySK1CkroWmBHUT4GdIFu+y2CZGwZmXvKW/Kyff ko559ldexVFXZ+CnmZWK7xeV2FamCKZ6gDsX06484TIbYv9xPKwcIKqZOb2bCulpEJh2 nDVHFbZ+7b2Wh0saZXYVSKjTuXeIasBKg5s5+emQZjdrmcs1TllN2blICppfduHMjv99 tj9w== X-Gm-Message-State: APjAAAVQUYrh++lJrLs6PgBL1qB5ghYGcYRHgwnkoris3DaRELNTBcDu smayjx7OXQkqdi3zHqcpWbx3FVBx X-Google-Smtp-Source: APXvYqx8+kyHsWT03NcCvqsfZg/uaQLgfUlCRT0p2iBzSs6ZGRhgfMt76KsrpdlZPHYvbuEU6HBxRg== X-Received: by 2002:a05:6214:1369:: with SMTP id c9mr24730141qvw.3.1569247442423; Mon, 23 Sep 2019 07:04:02 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:37 -0300 Message-Id: <20190923140343.1950-5-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.41]); Mon, 23 Sep 2019 14:04:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 23 Sep 2019 14:04:03 +0000 (UTC) for IP:'209.85.160.172' DOMAIN:'mail-qt1-f172.google.com' HELO:'mail-qt1-f172.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.160.172 mail-qt1-f172.google.com 209.85.160.172 mail-qt1-f172.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 04/10] 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Mon, 23 Sep 2019 14:04:10 +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