1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00

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: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Julio Faracco 2018-05-01 12:56:09 -03:00 committed by John Ferlan
parent 4e1a970219
commit 054a66037d

View File

@ -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;