]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
is_selinux_enabled() returns -1 on error, account for this.
authorScott Sullivan <ssullivan@liquidweb.com>
Thu, 20 Mar 2014 15:05:14 +0000 (16:05 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 20 Mar 2014 15:26:55 +0000 (16:26 +0100)
commit0099a4ae2b230cee3e4f14697e0ed1de9414e2b9
tree1dc0b22d72a9cde1cd104e13e292a994f2af1fb7
parentbc93c34ef6e02a947269741943529d52f96afe6a
is_selinux_enabled() returns -1 on error, account for this.

Per the documentation, is_selinux_enabled() returns -1 on error.
Account for this. Previously when -1 was being returned the condition
would still be true. I was noticing this because on my system that has
selinux disabled I was getting this in the libvirt.log every 5
seconds:

error : virIdentityGetSystem:173 : Unable to lookup SELinux process context: Invalid argument

With this patch applied, I no longer get these messages every 5
seconds. I am submitting this in case its deemed useful for inclusion.
Anyone have any comments on this change? This is a patch off current
master.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/security/security_selinux.c
src/util/viridentity.c