Running "make check" on F10, I get:
libvir: Security Labeling error : SELinuxInitialize: cannot open SELinux virtual domain
context file /etc/selinux/targeted/contexts/virtual_domain_context: No such file or
directory
Failed to start security driverFAIL: seclabeltest
Seems virtual_domain_context isn't available on F10.
Haven't investigated further, just want to have "make check" pass.
Signed-off-by: Mark McLoughlin <markmc(a)redhat.com>
---
src/security_selinux.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/security_selinux.c b/src/security_selinux.c
index ac317d7..c0b4a67 100644
--- a/src/security_selinux.c
+++ b/src/security_selinux.c
@@ -218,7 +218,13 @@ done:
static int
SELinuxSecurityDriverProbe(void)
{
- return is_selinux_enabled() ? SECURITY_DRIVER_ENABLE : SECURITY_DRIVER_DISABLE;
+ if (!is_selinux_enabled())
+ return SECURITY_DRIVER_DISABLE;
+
+ if (!virFileExists(selinux_virtual_domain_context_path()))
+ return SECURITY_DRIVER_DISABLE;
+
+ return SECURITY_DRIVER_ENABLE;
}
static int
--
1.6.0.6