提交 b20e957d 编写于 作者: J John Ferlan

util: Check for duplicated id in virStorageSourceParseRBDColonString

If we find multiple "id=" strings during processing, then we need
to force an error since we cannot have multiple <auth>'s defined
for a single source volume.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 466a3e5d
......@@ -2840,6 +2840,11 @@ virStorageSourceParseRBDColonString(const char *rbdstr,
if (STRPREFIX(p, "id=")) {
/* formulate authdef for src->auth */
if (src->auth) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("duplicate 'id' found in '%s'"), src->path);
return -1;
}
if (VIR_ALLOC(authdef) < 0)
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册