[PATCH 3/6] authz: support formating authz to xml

Zihao Chang changzihao1 at huawei.com
Thu Jan 14 08:18:18 UTC 2021


support formating vmdef's authz devices to xml
<authz mode='%s' index='%d' identity='%s'/>

Signed-off-by: Zihao Chang <changzihao1 at huawei.com>
---
 src/conf/domain_conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d547a93e16cd..540f1706fd23 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -28950,6 +28950,12 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def,
             return -1;
     }
 
+    for (n = 0; n < def->nauthzs; n++) {
+        if (virDomainAuthzDefFormat(buf, def->authzs[n]) < 0)
+            return -1;
+
+    }
+
     for (n = 0; n < def->ngraphics; n++) {
         if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0)
             return -1;
-- 
2.28.0





More information about the libvir-list mailing list