From nobody Mon Dec 15 23:01:30 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 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 --- 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