From nobody Sun Feb 8 06:54:35 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=1569247473; cv=none; d=zoho.com; s=zohoarc; b=Te05ZOqDhOxW2sthzscJ/WHlMcz2aD4uL76dffRgaeP79GIAMfPYw7WMM9scAippVZWyFyJl+Mv0dMNWPLVeN2lYYZl9woj+Q+rywiaHAXNiJ8WboIo5H98SYypcj91KZjf/RCq7tSxWemiJFGOvdlV/OadhqUA0KLgqgxqaw4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569247473; 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=OW3KV8cU4HbiixYN5tUSg93K0rmfC+6qjb5IK6g/il8=; b=YoSIMoPmB6Czot/RgSm4Daor1KEccfW5HYYtX/YemV2qRq76k7FGqJ8s9DIaBrKG9i6BRrzK/xVobIqoiSp9d7VbZ3e5nUjwEvMWVsYPFJGlJbdj1jYYgb8VgGrE933zExthhEV/7SBZcm4afumienYn1KUjPc333vJAnOapK+M= 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 1569247473083465.1446086983291; Mon, 23 Sep 2019 07:04:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99F85C049E10; Mon, 23 Sep 2019 14:04:31 +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 6FCC464026; Mon, 23 Sep 2019 14:04:31 +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 2566C4EE50; Mon, 23 Sep 2019 14:04:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8NE4KAa007021 for ; Mon, 23 Sep 2019 10:04:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 254651001B30; Mon, 23 Sep 2019 14:04:20 +0000 (UTC) Received: from mx1.redhat.com (ext-mx30.extmail.prod.ext.phx2.redhat.com [10.5.110.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3239D10013D9; Mon, 23 Sep 2019 14:04:17 +0000 (UTC) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (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 882512107; Mon, 23 Sep 2019 14:04:16 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id x5so17254038qtr.7; Mon, 23 Sep 2019 07:04:16 -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.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 07:04:15 -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=Fj9gBFFeucN0qcWh2dtToWli+nOYlydZH3LPZzljERI=; b=CBZ4nD0Yjjjy47ZDGGHz58FqF/RFNJ4TTMaJOnsDAJwH+J7uPtdCAanL/ebaWdR+xA 1jjd10Y/SLWOMEbqllwg3y9r/QQ7/9WKroybIzQwdK7RdTB3fNxiHP4eOj9l0HTSOBim aBF3V9S1gcb/QQ3uPr6hg15AfqtlWsJFiWobvG2ipKw2zFl1bujP4kBUhzlwQas0Sgsg 9JPFlJHYD9oYQdbrp2X88waiX7BCxGXunZ2GDoPghGESkydWcEZqRt0t2eyDMuTcwtT7 ttLsjyGkUNVMTyaQo2rikQHznC7l2TDkt5F9Pw9YmyxoNLV7RUBY+j1lamhU54h5MBKw z93Q== 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=Fj9gBFFeucN0qcWh2dtToWli+nOYlydZH3LPZzljERI=; b=JQTgft+cA2No5Omv57ELPEh246/XxeyJfZe+IiLzNCyPIbtq+XokZZOwP75M29Rs4E Hx7dv7DaEf6J5rSxnKhHyOiXaTgKN/g/gVqbNF+6bjJZ2VX04M1BLgbbYegxl2Wbg/0r imgzESLxj67zCg0fSSG4XCtR2o6NiNBkgBQq1NdaEGRYHR8XReVY2eEj+wQFucjj6xxx 5gOJyEf7TbS7yzFzahN9vw3IWLbdJN2WSeSXZAWdimhB+7N+KgcfxyGixC9BmMXnsls1 ZvUKSyaZKvBb9EyCURZJPLyUsVQh0+c34i/B5HLx383tWBAGtAAaBDOO19drPiQp36kK u/Lw== X-Gm-Message-State: APjAAAXAEsNcSrmCU9K2n4uDeC9zk3yGZgfv7lUDuYM1UYaWjulwO6CB OwulZ1sLk6x2VpMSA++xS8WrudSh X-Google-Smtp-Source: APXvYqzLIzVC2tzly1v+V8mze+siizfCsEoeX9qsBra4egwrPvFgT/T3UcvPz1E86h4Ak2Xx/JOYxg== X-Received: by 2002:a0c:f9c3:: with SMTP id j3mr24002114qvo.193.1569247455667; Mon, 23 Sep 2019 07:04:15 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 11:03:43 -0300 Message-Id: <20190923140343.1950-11-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.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 23 Sep 2019 14:04:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 23 Sep 2019 14:04:16 +0000 (UTC) for IP:'209.85.160.195' DOMAIN:'mail-qt1-f195.google.com' HELO:'mail-qt1-f195.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.195 mail-qt1-f195.google.com 209.85.160.195 mail-qt1-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.71 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH 10/10] vbox_driver.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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 23 Sep 2019 14:04:32 +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/vbox/vbox_driver.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index 1f31fa28df..d7e80828ab 100644 --- a/src/vbox/vbox_driver.c +++ b/src/vbox/vbox_driver.c @@ -58,20 +58,8 @@ static virDrvOpenStatus dummyConnectOpen(virConnectPtr c= onn, =20 virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); =20 - if (uid !=3D 0) { - if (STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown driver path '%s' specified (try vbox= :///session)"), conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } else { /* root */ - if (STRNEQ(conn->uri->path, "/system") && - STRNEQ(conn->uri->path, "/session")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown driver path '%s' specified (try vbox= :///system)"), conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } - } + if (!virConnectValidateURIPath(conn->uri->path, "vbox", uid =3D=3D 0)) + return VIR_DRV_OPEN_ERROR; =20 virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unable to initialize VirtualBox driver API")); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list