On 05/16/14 16:57, Ján Tomko wrote:
We allow a seclabel to be specified in the <source> element
of a chardev:
<serial type='file'>
<source path='/tmp/serial.file'>
<seclabel model='dac' relabel='no'/>
</source>
</serial>
But we format it outside the source:
<serial type='file'>
<source path='/tmp/serial.file'/>
<target port='0'/>
<seclabel model='dac' relabel='no'/>
</serial>
Move the formatting inside the source to fix this to make the
seclabel persistent across XML format->parse.
Introduced by commit f8b08d0 'Add <seclabel> to character devices.'
---
v2: don't crash (and add a test for that too)
src/conf/domain_conf.c | 30 +++++++--------
.../qemuxml2argv-chardev-label.xml | 45 ++++++++++++++++++++++
tests/qemuxml2xmltest.c | 2 +
3 files changed, 62 insertions(+), 15 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-chardev-label.xml
ACK,
Peter