From nobody Sun Feb 8 03:58:02 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=UhN6Fj2cUXb9ucqdwdBJukyQlYeX/G8cvO8gFcZvtItwSeS//hJSif3p4v54lH7NAdOMWFiN/jC9JIfOdyhjcIXaeJzC6OZ5gESK8yqSTG2a0Q3e+tUgZfQKPSKB1wSRvIV1KL1VZWMies02d4j7QEw4ytVbYvyxcBfMDhsYW98= 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=AgFyjIzX84LtERYKKqnmrXrJSWOIjl5Hx4FyKbGE8SU=; b=DbZwUFe/GD7qnhq+WuBbWcZLxmN4VQTu9a0S8fcQlZrY106VptdwB7rzdbCruPT7u/WUhqY4kyVRvtPSwlG7folFELhTrj6rW2eE1o7KBhABK4CmrNCKderc6J9hfl+r+JPdWpuv9n/Z5lpKDdoAbIpW+nMr8ajw4kri9l5EehA= 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 1569271500712582.2127883634233; 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 CF304C0718BE; Mon, 23 Sep 2019 20:44:58 +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 A19DD6012D; 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 6602A180B761; 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 x8NKifQm031631 for ; Mon, 23 Sep 2019 16:44:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id E484C60BAB; Mon, 23 Sep 2019 20:44:40 +0000 (UTC) Received: from mx1.redhat.com (ext-mx23.extmail.prod.ext.phx2.redhat.com [10.5.110.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9507760BBE; Mon, 23 Sep 2019 20:44:40 +0000 (UTC) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 D872F1096901; Mon, 23 Sep 2019 20:44:39 +0000 (UTC) Received: by mail-qt1-f179.google.com with SMTP id d2so18880970qtr.4; Mon, 23 Sep 2019 13:44:39 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 13:44:38 -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=AQT+//WxQh+BQMzjPi3JunIac4UDw7Zum2hVVNZLw0Q=; b=rj2GZ6oyUJsSHo34uqDP5yQ5exhlj11QTy8MCJQLouvmGRQoCeJIPsgUcRR9Zb9DwQ pAz2OPJlKw2Bbcke9WitQYiO2VNbAMeXQN5yMuGVVw6V/CrLGnNWn9NEkoHlG6AcnQ1Q wO1YQdA7ohqvWzgDc2OdBITcrrtDaKiyDBUqyAGoh+APoufq+scrAl3AuN9AOUixM4w6 ym2y5ICjRGdR+pKUzNNqm502xW5mpxeRGt+8KR2AH49Ti4M4WGytCKGvb9szgdh3V9n7 W4pkMIwS020NxxBCPHoDOoFJGcGo4R0SxvEsSz8TZ2QIQz10p7VYU57uCcM1DDi0l7Im 61qQ== 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=AQT+//WxQh+BQMzjPi3JunIac4UDw7Zum2hVVNZLw0Q=; b=uObP0o64Le9MMib/n5c6Lrz0OVB47SyG+A+qjSr+3RMxqUqEeUxD1Uz9togEMCEmiL Kqe0CRN532lkcRYKCHbVmUNxl36suge6jeh4fKfONWF0E4WzSm1wBtHSJPtFNzNcUs4e R9sT8S+LeqMmFnuyeGu/bIqH38KpQkvsvyt3+aydh54/aOe5AV0WqP9wLj58NylEvsIM TXoBjM49GTb2WmJmSvjl27bo3eVvm9QRxiaqTG0XkdxTw40MereA51NwFnAFrBc3FKn1 0JfRy2v421NBL+cx9zgoMGBy+NJEMHD0f69iAeI9kAieqVXfqvgWfGvZZUb/0xnD6wac gwQw== X-Gm-Message-State: APjAAAUJpqX5+UhQIXcEG0Ig3umd7jv/+Z+vG2btPHPqaYguFt4yKu6C REYS3w64rvUQDmesg38k6AvlG3Tj X-Google-Smtp-Source: APXvYqzSPyA3G/y9m7MGlQevl5uByk5E8vcRwUi3XQBnCxxQF2jdIV9S70bMDmDjT6M/sSF8kJ/1Fg== X-Received: by 2002:ac8:3482:: with SMTP id w2mr1997120qtb.379.1569271479063; Mon, 23 Sep 2019 13:44:39 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 17:44:15 -0300 Message-Id: <20190923204423.23824-4-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.64]); Mon, 23 Sep 2019 20:44:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Mon, 23 Sep 2019 20:44:40 +0000 (UTC) for IP:'209.85.160.179' DOMAIN:'mail-qt1-f179.google.com' HELO:'mail-qt1-f179.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.179 mail-qt1-f179.google.com 209.85.160.179 mail-qt1-f179.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.64 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 03/11] interface_backend_udev.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_udev.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index ddc3de5347..d870e3d1b1 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -1250,21 +1250,8 @@ udevConnectOpen(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