[libvirt] [PATCHv2] conf: fix seclabels for chardevs

Peter Krempa pkrempa at redhat.com
Fri May 16 15:29:45 UTC 2014


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140516/47e8c364/attachment-0001.sig>


More information about the libvir-list mailing list