提交 4e1a9702 编写于 作者: J Julio Faracco 提交者: John Ferlan

qemu: avoid slash characters to the new domain name.

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 b1fc6a7b).
This commit enhace the 'domrename' command adding this check.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1333232Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 d2f5bb71
......@@ -20765,6 +20765,12 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
virCheckFlags(0, ret);
if (strchr(new_name, '/')) {
virReportError(VIR_ERR_XML_ERROR,
_("name %s cannot contain '/'"), new_name);
return -1;
}
cfg = virQEMUDriverGetConfig(driver);
if (VIR_STRDUP(new_dom_name, new_name) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册