提交 da9f3cd8 编写于 作者: P Peter Krempa

conf: Format seclabels for <backingStore>

We parse the seclabels and use them internally so omitting them when
formatting would be misleading. Additionally our schema actually allows
them.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e8e51b63
......@@ -23876,8 +23876,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
virBufferAdjustIndent(buf, 2);
virBufferAsprintf(buf, "<format type='%s'/>\n", format);
/* We currently don't output seclabels for backing chain element */
if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags, false,
if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags, true,
false, xmlopt) < 0 ||
virDomainDiskBackingStoreFormat(buf, backingStore->backingStore,
xmlopt, flags) < 0)
......
......@@ -38,7 +38,11 @@
<source file='/tmp/image2.qcow'/>
<backingStore type='file' index='3'>
<format type='qcow2'/>
<source file='/tmp/image3.qcow'/>
<source file='/tmp/image3.qcow'>
<seclabel model='selinux' relabel='yes'>
<label>system_u:system_r:public_content_t:s0</label>
</seclabel>
</source>
<backingStore type='file' index='4'>
<format type='qcow2'/>
<source file='/tmp/image4.qcow'/>
......
......@@ -39,7 +39,11 @@
<source file='/tmp/image2.qcow'/>
<backingStore type='file' index='3'>
<format type='qcow2'/>
<source file='/tmp/image3.qcow'/>
<source file='/tmp/image3.qcow'>
<seclabel model='selinux' relabel='yes'>
<label>system_u:system_r:public_content_t:s0</label>
</seclabel>
</source>
<backingStore type='file' index='4'>
<format type='qcow2'/>
<source file='/tmp/image4.qcow'/>
......
......@@ -39,7 +39,11 @@
<source file='/tmp/image2.qcow'/>
<backingStore type='file'>
<format type='qcow2'/>
<source file='/tmp/image3.qcow'/>
<source file='/tmp/image3.qcow'>
<seclabel model='selinux' relabel='yes'>
<label>system_u:system_r:public_content_t:s0</label>
</seclabel>
</source>
<backingStore type='file'>
<format type='qcow2'/>
<source file='/tmp/image4.qcow'/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册