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)
<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'/>
<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'/>
<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'/>