242c526
From 98a389d6fb609cdecbf6422eb6a3a9b6bf503ec2 Mon Sep 17 00:00:00 2001
242c526
From: Adam Jackson <ajax@redhat.com>
242c526
Date: Wed, 11 Mar 2009 12:59:36 -0400
242c526
Subject: [PATCH] selinux: Don't enable unless there's something to do.
242c526
242c526
---
242c526
 Xext/xselinux.c |    4 ++++
242c526
 1 files changed, 4 insertions(+), 0 deletions(-)
242c526
242c526
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
242c526
index f8495ea..042d134 100644
242c526
--- a/Xext/xselinux.c
242c526
+++ b/Xext/xselinux.c
242c526
@@ -1952,6 +1952,10 @@ SELinuxExtensionInit(INITARGS)
242c526
 	return;
242c526
     }
242c526
 
242c526
+    /* Don't init unless there's something to do */
242c526
+    if (!security_get_boolean_active("xserver_object_manager"))
242c526
+	return;
242c526
+
242c526
     /* Check SELinux mode in configuration file */
242c526
     switch(selinuxEnforcingState) {
242c526
     case SELINUX_MODE_DISABLED:
242c526
-- 
242c526
1.6.1.3
242c526