From nobody Wed May 14 06:03:02 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525190301869829.7765066507751; Tue, 1 May 2018 08:58:21 -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 886AE4E028; Tue, 1 May 2018 15:58:20 +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 D9CDE18AD8; Tue, 1 May 2018 15:58:19 +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 E9EAA4CAA8; Tue, 1 May 2018 15:58:18 +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 w41FulxL024785 for ; Tue, 1 May 2018 11:56:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6134C60A9D; Tue, 1 May 2018 15:56:47 +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 55A1060606 for ; Tue, 1 May 2018 15:56:43 +0000 (UTC) Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.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 3115C3188CC4 for ; Tue, 1 May 2018 15:56:33 +0000 (UTC) Received: by mail-qt0-f195.google.com with SMTP id q6-v6so15053407qtn.3 for ; Tue, 01 May 2018 08:56:33 -0700 (PDT) Received: from localhost.localdomain ([177.45.6.32]) by smtp.gmail.com with ESMTPSA id y13-v6sm7403569qti.85.2018.05.01.08.56.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 08:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=beYWMhN2geQ4HRnkIo8xtuXaI8fdI4S9u/ZdgADpC6Q=; b=Bgz/PylMDJyhHmu+M9m7tzDM0/eUGLBj1yp9CGGJcDPQcEQfRi8ujHKov6subyY4Jp 5AMjSQXCbdIlUTFKhJeflNb4B1JtAlemYbuRs4zm9/YKANkOUe74LaX2+7dpQqwOpp87 0ho57IiWiLzW3CRo5TbGqgd8RJLQmhiCEHJAkeaeoSE3AJWmuLs+ehqeHmX1GdAakhem dxM7SmZxGIM4nGhdkYZpGcGAQYZUUwyi0puKeQg6A9XFve3w9/7HKhOdJYYiqaa/gNmB nw7+gyxR1hhM5wmTsFiqT4N8xWe5Rcekuis//obJso0MY01mlEyk1g54waImyO1LJxoO 5lGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=beYWMhN2geQ4HRnkIo8xtuXaI8fdI4S9u/ZdgADpC6Q=; b=Njjm2nMWzXArEkWdxqaAY+zoIrJATHxS9kByOwHO1MjKrpBzO8tv2+Zve+y/ikUOLJ X5wO+y4qNvpUQff8H9xJs9g/WC95DXTH6q4mslSb8847cpfouH4tBMcwAUZ/OsJ5ILSY SloTOwXqPHrIoHihGL0XYDo9Kj7XOaV1ijqJMletDOkAOhIzOQINc+pzdOVJ2agntYu/ p7wwq4kT7rIs/furJy0m+Ieckvw+r1W6HeR7Q8xTnFJ/UEjHzogXi/HQKXsRQz314+K6 VwdLUAtXNzWvEyKn8ah0G69EGFROk4uQDgz8qHheq7vooTv6sIoRL2fqumNnYUAEGrAr nIQg== X-Gm-Message-State: ALQs6tA3pQ8EcVADt1H4jcWYzpOSykyTK9IyTOK49e7opS2U8GyKdp0x hQEYDgvONdkRJSABY6P5fmDBNw== X-Google-Smtp-Source: AB8JxZrHQ1o1Cx8wuHprGackY5r3+zdTvSfxzeX+BNzHxpUU12Tv/YOBo1uOBCLGLvSh4XlrVd3u3A== X-Received: by 2002:ac8:2315:: with SMTP id a21-v6mr14434606qta.73.1525190192082; Tue, 01 May 2018 08:56:32 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Tue, 1 May 2018 12:56:09 -0300 Message-Id: <20180501155609.4928-3-jcfaracco@gmail.com> In-Reply-To: <20180501155609.4928-1-jcfaracco@gmail.com> References: <20180501155609.4928-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 01 May 2018 15:56:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 01 May 2018 15:56:33 +0000 (UTC) for IP:'209.85.216.195' DOMAIN:'mail-qt0-f195.google.com' HELO:'mail-qt0-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.216.195 mail-qt0-f195.google.com 209.85.216.195 mail-qt0-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v5 2/2] test: avoid slash characters to the new domain name. 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: , MIME-Version: 1.0 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.38]); Tue, 01 May 2018 15:58:21 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" As QEMU driver, test driver does not accept slashes inside domain names. This commit fixes this problem checking slashes inside the new name when 'domrename' is executed. Signed-off-by: Julio Faracco --- src/test/test_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a1888c0c9f..974369f28a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2638,6 +2638,12 @@ testDomainRenameCallback(virDomainObjPtr privdom, =20 virCheckFlags(0, -1); =20 + if (strchr(new_name, '/')) { + virReportError(VIR_ERR_XML_ERROR, + _("name %s cannot contain '/'"), new_name); + return -1; + } + if (VIR_STRDUP(new_dom_name, new_name) < 0) goto cleanup; =20 --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list