提交 5d1c0418 编写于 作者: J Ján Tomko

Ignore storage volumes with control codes in their names

To prevent generating invalid XML.

https://bugzilla.redhat.com/show_bug.cgi?id=1066564
(cherry picked from commit 60db2bc8)
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 5102d2c2
......@@ -863,6 +863,12 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn ATTRIBUTE_UNUSED,
while ((direrr = virDirRead(dir, &ent, pool->def->target.path)) > 0) {
int ret;
if (virStringHasControlChars(ent->d_name)) {
VIR_WARN("Ignoring file with control characters under '%s'",
pool->def->target.path);
continue;
}
if (VIR_ALLOC(vol) < 0)
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册