From nobody Wed May 1 16:01:41 2024 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 1525190357064568.4818324415617; Tue, 1 May 2018 08:59:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D860913A8F; Tue, 1 May 2018 15:59:15 +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 A5A1E2015992; Tue, 1 May 2018 15:59:15 +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 5C6FD180BADA; Tue, 1 May 2018 15:59:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w41FuhMD024775 for ; Tue, 1 May 2018 11:56:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id C28A634206; Tue, 1 May 2018 15:56:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9421341FE for ; Tue, 1 May 2018 15:56:42 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.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 09C063002F95 for ; Tue, 1 May 2018 15:56:31 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id z75so9157397qkb.6 for ; Tue, 01 May 2018 08:56:30 -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.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 08:56:29 -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=0oaPh/L+YbpsgDdKpuouaDKurvBmENYUsJgtRXU/PRg=; b=NkpwCCQltbNxnbKSW52TV3vE7djvTsOnj2TG5BP0OCHL6Wyg2jU//JeTZf6eUlHnwy WfS13WNAPqmsdvgJ8gHl0/iJ1SldMN1h0c3AT3Iiw6zz251RZtqFRQW2tx3OYUgmgBYR dynDKJ9/8jbELf5Ud+H5mp7PiBCbV5LkQLyUp35xoofRBdvndSMmzCgXXesXdy/uT9SB TYN0D1cENIcg23ekc6EArw4AiS68pXnym0+NweAPsePtsbSWNXkEJH2Yd7G076Pc8snA QBYXGeVpP5J6vXfsEyteVvsk9TUM1aeBMhhB4lILBP91iOgmxTqbcZ12R43QIkTBPMB8 V88Q== 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=0oaPh/L+YbpsgDdKpuouaDKurvBmENYUsJgtRXU/PRg=; b=b79Iz5BxwlLfQ852EIyGv4+9doX0IGU/rxoncAsIk6epNfdZZoMbPA/Cui4hn9ZUxS DDUCdkXUcVkeDESa2ndG6+WzV5KCWbhKgQorqesnQYHHAaXVeIA5NtTzoVlMy633cdOh wmYVrhiY/pRkHUWw2rSAhH0iVh/VH+r+omoqYf4NkIHNVyk+Sy0puqTAWI1Ca12OMnnk A0aOuNcbYcEh3ffWOqCUvLj+JHSm38lNipeyhauhe7qjcuOBm21lVnuyRCH6XNHsLbBq sipNCCIV40sGOrdGXb9Mo/9wHQcRvYsEPLgHhE8279B5GqDdSQfhjKt41UshWSQx1vYv GG7g== X-Gm-Message-State: ALQs6tDxUE4X3L6IJe4TEdp2qnjOAi0/Pulrgh6O9Llg4WNo4fGK70BF b6XoAzKculbYs4MTyHYseK2oEA== X-Google-Smtp-Source: AB8JxZojVZNs6A4AxiG7X6kW9/V5vy/PuWwMESDA2LswNfuYH9otcirHvn0SYKbfNi0dfh3LoPTkhQ== X-Received: by 10.233.230.10 with SMTP id z10mr13756491qkf.365.1525190189977; Tue, 01 May 2018 08:56:29 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Tue, 1 May 2018 12:56:08 -0300 Message-Id: <20180501155609.4928-2-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.48]); Tue, 01 May 2018 15:56:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 01 May 2018 15:56:31 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-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.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v5 1/2] qemu: 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.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 01 May 2018 15:59:16 +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" The 'domrename' command needs to check if the new domain name contains the slash character. This character is not accepted by libvirt XML definition because it is an invalid char (see Cole's commit b1fc6a7b7). This commit enhace the 'domrename' command adding this check. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1333232 Signed-off-by: Julio Faracco Reviewed-by: John Ferlan --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7484b00e23..79a1ddcebf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20752,6 +20752,12 @@ qemuDomainRenameCallback(virDomainObjPtr vm, =20 virCheckFlags(0, ret); =20 + if (strchr(new_name, '/')) { + virReportError(VIR_ERR_XML_ERROR, + _("name %s cannot contain '/'"), new_name); + return -1; + } + cfg =3D virQEMUDriverGetConfig(driver); =20 if (VIR_STRDUP(new_dom_name, new_name) < 0) --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 16:01:41 2024 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 Reviewed-by: John Ferlan --- 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