From nobody Sun Feb 8 04:11:42 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=1569509847; cv=none; d=zoho.com; s=zohoarc; b=Ix5NIrEQybT+lH/jB7zVoIXT5/fZ6DNQ05xfLLgi/Y7Eybr7srs4j7bIEYveOdg6WtSpS3xxiR4BYHAN0P+ST6hOOE7QVwgNwei+yoeLtcGl9ByOqgfT/2rBYs4NN0Eozb8YmoRMsN6xMlBLFqp0xuHiLFXJ5pMATU23mjgqyJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569509847; 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=e6PwcySTplA9bAdenEBDULkrJscbY0QhWhOfLb9WVGA=; b=cwN7pCgn7RnK4d9vQkq/KrpdFCsCxH8BUV8S2EeSDHIZJ6JxceEy94IUh2HvJYDqV3Wfi54Hhdvu9f3yLKSUooBIRYt5IeL0ly0snG+cyL7WvfU/xhoegiBgu3ooSUTPR9QZWFe9RiJZhbLlQ2ryMYWzmbV8Tdmtyc8pbjxHcI8= 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 1569509847345758.270532234567; Thu, 26 Sep 2019 07:57:27 -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 9392C89810D; Thu, 26 Sep 2019 14:57:25 +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 6D8EE5C220; Thu, 26 Sep 2019 14:57:25 +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 2C24818037CD; Thu, 26 Sep 2019 14:57:25 +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 x8QEv9Ou028799 for ; Thu, 26 Sep 2019 10:57:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0913C600CE; Thu, 26 Sep 2019 14:57:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx21.extmail.prod.ext.phx2.redhat.com [10.5.110.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A44B5600C6; Thu, 26 Sep 2019 14:57:06 +0000 (UTC) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 8690118C4292; Thu, 26 Sep 2019 14:57:05 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id f16so2006984qkl.9; Thu, 26 Sep 2019 07:57:05 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 07:57:04 -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=aNPJJ2nW1CmnhkDYHPJ7o2UA2mfUo2uHBlOXnr2X52g=; b=CfXeoX7NFVzOXWuzrdiFHBIQzspacfYDNd58JZDJ/eO5MUxCmLpMxwTfk+wdIWly/J RTERsywLPNeZGsktD5hzO6DPGOwsI71xX1M80rd7Mv0tAOCx+4Im7tlUJSNNL18osrBH Y6n2V6P6DZzdERiPsENFdthTFcbPX6Zm6q2FxmMs6nZMQ9soIGYv9lyJntrZLbzEX6no UZyeZL7B28OA7Bijdj1Fp2oUaeHC2vnGRuNfLsKSogU2sy0c6J3gP/ufn0CrIazEd1ZM cCxn17DquZamFyLSlUVHUKi0MjDHt0Md8VwOE57G7c/cfUJoUZp/cYt5zd45sQYKwVp3 VOJA== 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=aNPJJ2nW1CmnhkDYHPJ7o2UA2mfUo2uHBlOXnr2X52g=; b=O1bDNIi6xqZPmbVLTjDPq44v5FBGEF/dKCLnYdbQlJQDuuG1sUmFuy7qYPxctrzyYS K9LbE3ZZKV0a/11+b6xDOc9Nv3XGae0XAnFNu7qXcYbNjrdu2hpU52TNVG3ZjGrcTww0 Ur5cdkxzBqbCSfj5eVOl4FiUuoszHXxqYcEbZKXQrw98AWWAugvHyTniiehj8izqAAyh KfmDATdTHxlL8GqSiHjsuKZErDEMz3IySS5w3mmrQOwHDjcGe7lhHMsWqEg8/h25gaKb HnXulDiTCGHkY4k+bCt9/YKD0LerL8W8uZyGNW2uVItstrnkOFhzrYrvGD/s5edJlsGy z9Gw== X-Gm-Message-State: APjAAAUrgyc3Q/wixwgUJHYUGsNiW+WRqeplVFCwmxhkb9BeP/GPOmO9 /UHDadnEa80LtMuwjVEucyEZuaJVSV0= X-Google-Smtp-Source: APXvYqxFgrruKNqtl6jJ/abpeMcRLkxA0O0bEuxM0y4LiUg+071hqOK9bLHIVjv+zxEYwiVe+3oLwg== X-Received: by 2002:a37:a182:: with SMTP id k124mr3736606qke.354.1569509824634; Thu, 26 Sep 2019 07:57:04 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Thu, 26 Sep 2019 11:56:38 -0300 Message-Id: <20190926145647.3478-4-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.6.2 (mx1.redhat.com [10.5.110.62]); Thu, 26 Sep 2019 14:57:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Thu, 26 Sep 2019 14:57:05 +0000 (UTC) for IP:'209.85.222.178' DOMAIN:'mail-qk1-f178.google.com' HELO:'mail-qk1-f178.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.178 mail-qk1-f178.google.com 209.85.222.178 mail-qk1-f178.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.62 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v4 03/12] 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Thu, 26 Sep 2019 14:57:26 +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 | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index ddc3de5347..1684b8ed83 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -1250,21 +1250,10 @@ 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->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