mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
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: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e8e51b634f
commit
da9f3cd84b
@ -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'/>
|
||||
|
Loading…
Reference in New Issue
Block a user