提交 054a6603 编写于 作者: J Julio Faracco 提交者: John Ferlan

test: avoid slash characters to the new domain name.

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: NJulio Faracco <jcfaracco@gmail.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 4e1a9702
......@@ -2638,6 +2638,12 @@ testDomainRenameCallback(virDomainObjPtr privdom,
virCheckFlags(0, -1);
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册