From nobody Sun Feb 8 04:11:23 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=1569509864; cv=none; d=zoho.com; s=zohoarc; b=QVlpCluVzoQdV6qCbrcPO8/JFmXOXwSIVvokPdD98rCD5/svMoU7wn8EEsqgYN8KJdw3AizmNEpXll9ylICdIGK8t4kI8bjTPPaFFg+xTkkYL5qNo9Z5A4cf9WGZPDIyEsgFzrt2SvuKiMx8C7JxN7bJoK86Tc3Y3IbgqIrSOlI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569509864; 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=G8I0tdI0XQ43EIaS0U0MOKWz01Hwgek0evSRTiXmrWAibbNTjOKWxRHE/U9+dYv+LpJ6T0UyP6qXb50s6B+Bh0qoQbjz5IqIRzS3cqOQ6+k64B1AC26GkSPxV1MvV3QLB+99n240veWGbmAwNZC59O808F72+tiP5OZUqF8SoNM= 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 1569509864691972.6864407145853; Thu, 26 Sep 2019 07:57:44 -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 F3B7F3086E27; Thu, 26 Sep 2019 14:57:42 +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 C7B471001B2C; Thu, 26 Sep 2019 14:57:42 +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 8AC851803518; Thu, 26 Sep 2019 14:57:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8QEv9h8028804 for ; Thu, 26 Sep 2019 10:57:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1BD8660A9F; Thu, 26 Sep 2019 14:57:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12ED160923; Thu, 26 Sep 2019 14:57:09 +0000 (UTC) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (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 F2253306085E; Thu, 26 Sep 2019 14:57:07 +0000 (UTC) Received: by mail-qk1-f174.google.com with SMTP id w2so2035693qkf.2; Thu, 26 Sep 2019 07:57:07 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:cd57:9a0c:bf:55c8:50dd]) by smtp.gmail.com with ESMTPSA id x12sm1346543qtb.32.2019.09.26.07.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 07:57:06 -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=GygGEdGBgh+Xx63D9usMSNJSIOCunF/VtnsJKP4uJpfFUJwoCmb8Ptz7Vi2dPpVCUe v64xAp2uS/SfucBUXLOV6QJXBAVLtBITnnIdPxYJWxaWB9sHh/4wQsOB+2Rxw5mx3xWQ I3DkjtfoACxFPCSSFVdN+0jZv1c4eT+IdsuPvHvXx5J1wHou9BxYp48H2c0wpblXMKHk 0aR6esMCDJ6zMUN73yM1SFykB3oAvoxyxHlAF3NNVJwzUSSwJZ5NoZgEsJdl7AUp2ZMF 74U8YtL0Gf8yAQhz9xRtYsPZdiSc5vFu5kSUQZBwr/aLEek3wF4jT0DyPLI9fzwDRdm7 FVmg== 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=jx+yB2u3aJtldsZSXz/zhq99h4lLSmgmU4ii9310Ovc3Cqyv6hPkZVeWbMAkonHvYW 6l4Yz6Q8lMp+q2NMxzYGIn9/U9b+pRF112hhmL5U1ICrDYHoVdkQpOT4iJKIW03Jpxfx 7+b4zgDtieC3E21aZ6Bott2NT6rndPuFgemfolmZsR5J3HryJtI7TVUcnsueqtzne8e+ RuzbfapdN2/8NfKdCZjtOeFp+bKA1bE5FhiaamU3wMw7m8KRltwtcGWCK2NPa6r+3+/v ZV5bPyEd3vLxUd33v+E/V2Rw4as3pupXZgn13A05w+CT1XJNeapglOzIKmHkU3MXincF DsIQ== X-Gm-Message-State: APjAAAUg2T17R3o5dQn1VqHmzvytw8aFuZRmmhQGni1OhxY667wS83Rd AmtppBbhxgwq5OJ55w37OJA7okkvUJg= X-Google-Smtp-Source: APXvYqwEmwXz8wO/Aqa4QCRp4Yndlww3pVDgzOFMH4FDO9OzjmhOhSek+lBD7oZn8qlf/dyoHGUBXA== X-Received: by 2002:a05:620a:140b:: with SMTP id d11mr3701820qkj.22.1569509827026; Thu, 26 Sep 2019 07:57:07 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Thu, 26 Sep 2019 11:56:39 -0300 Message-Id: <20190926145647.3478-5-danielhb413@gmail.com> In-Reply-To: <20190926145647.3478-1-danielhb413@gmail.com> References: <20190926145647.3478-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.40]); Thu, 26 Sep 2019 14:57:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 26 Sep 2019 14:57:08 +0000 (UTC) for IP:'209.85.222.174' DOMAIN:'mail-qk1-f174.google.com' HELO:'mail-qk1-f174.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.174 mail-qk1-f174.google.com 209.85.222.174 mail-qk1-f174.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v4 04/12] 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 26 Sep 2019 14:57:43 +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