summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-12-28 11:56:54 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-12-28 13:27:28 -0500
commitf4bc333fc1e8d9fa9911771d2072df4df741c553 (patch)
tree1a69fc6a1da4b417898b79a5dad509e652d8a3ef /Xext
parentf3780ece528ed3ead809ba6a388fa0f8aab2a775 (diff)
xselinux: don't FatalError on an invalid class mapping, just disable support.
Diffstat (limited to 'Xext')
-rw-r--r--Xext/xselinux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index d7c73227d..f3a84571e 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1376,15 +1376,20 @@ XSELinuxExtensionInit(INITARGS)
/* Setup SELinux stuff */
if (!is_selinux_enabled()) {
- ErrorF("XSELinux: Extension failed to load: SELinux not enabled\n");
+ ErrorF("XSELinux: SELinux not enabled, disabling SELinux support.\n");
return;
}
selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog);
selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit);
- if (selinux_set_mapping(map) < 0)
+ if (selinux_set_mapping(map) < 0) {
+ if (errno == EINVAL) {
+ ErrorF("XSELinux: Invalid object class mapping, disabling SELinux support.\n");
+ return;
+ }
FatalError("XSELinux: Failed to set up security class mapping\n");
+ }
if (avc_open(NULL, 0) < 0)
FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n");