提交 5c5ec4ca 编写于 作者: J John Ferlan 提交者: Cole Robinson

storage: Fix incorrect format for <disk> <auth> XML

https://bugzilla.redhat.com/show_bug.cgi?id=1256999

After creating a copy of the 'authdef' in a pool -> disk translation,
unconditionally clear the 'authType' in the resulting disk auth def
structure since that's used for a storage pool and not a disk.  This
ensures virStorageAuthDefFormat will properly format the <auth> XML
for a <disk> (e.g. it won't have a <auth type='%s'.../>).

(cherry picked from commit 5275c0f4)
上级 07518f77
......@@ -3190,6 +3190,8 @@ virStorageTranslateDiskSourcePoolAuth(virDomainDiskDefPtr def,
def->src->auth = virStorageAuthDefCopy(source->auth);
if (!def->src->auth)
goto cleanup;
/* A <disk> doesn't use <auth type='%s', so clear that out for the disk */
def->src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
ret = 0;
cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册