[libvirt] [PATCH] SELinux: don't silently fail when no label is present

Eric Blake eblake at redhat.com
Mon Jun 9 22:33:00 UTC 2014


On 06/09/2014 08:30 AM, Ján Tomko wrote:
> This fixes startup of a domain with:
> <seclabel type='none' model='dac'/>
> on a host with selinux and dac drivers and
> security_default_confined = 0
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1105939
> ---
>  src/security/security_selinux.c | 98 ++++++++++++-----------------------------
>  1 file changed, 29 insertions(+), 69 deletions(-)

Shouldn't there also be a change somewhere under tests/ to ensure that
we parse XML in that situation?

Otherwise, this looks like a fairly mechanical conversion of
virDomainDefGetSecurityLabelDef() returning NULL from being a silent
error into being successful; and that makes sense since domain_conf.c
does not report any errors if a label cannot be looked up.  ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list