mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03:00
Forbid new-line char in name of new storagepool
New line character in name of storagepool is now forbidden because it mess virsh output and can be confusing for users. Validation of name is done in driver, after parsing XML to avoid problems with dissappeared pools which was already created with new-line char in name. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6c98ac2c62
commit
ae381879f3
@ -38,6 +38,8 @@
|
||||
<ul>
|
||||
<li>vz: Fix migration in P2P mode
|
||||
</li>
|
||||
<li>Forbid newline character in names of some libvirt objects.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -780,6 +780,9 @@ storagePoolDefineXML(virConnectPtr conn,
|
||||
if (!(def = virStoragePoolDefParseString(xml)))
|
||||
goto cleanup;
|
||||
|
||||
if (virXMLCheckIllegalChars("name", def->name, "\n") < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStoragePoolDefineXMLEnsureACL(conn, def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user