From 5c5ec4ca9ed408d7ce23cfbabff0d69436cf453d Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 23 Sep 2015 16:28:30 -0400 Subject: [PATCH] storage: Fix incorrect format for 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 XML for a (e.g. it won't have a ). (cherry picked from commit 5275c0f4a1267c630b5c3b77fac8cbe4fcaa3adb) --- src/storage/storage_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 16d0b6c71f..8fc269748f 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -3190,6 +3190,8 @@ virStorageTranslateDiskSourcePoolAuth(virDomainDiskDefPtr def, def->src->auth = virStorageAuthDefCopy(source->auth); if (!def->src->auth) goto cleanup; + /* A doesn't use src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE; ret = 0; cleanup: -- 2.47.2