84b277
From 602f5a2c2a7ed23ebd61a728f6e16f63024e3c1f Mon Sep 17 00:00:00 2001
84b277
From: Michael Scherer <misc@zarb.org>
84b277
Date: Thu, 6 Feb 2014 10:05:17 +0100
84b277
Subject: [PATCH] exec: Ignore the setting SELinuxContext if selinux is not
84b277
 enabled
84b277
84b277
(cherry picked from commit 5c56a259e07661a66e806cc2fbc71de96a75f78e)
84b277
84b277
Related: #1113790
84b277
---
84b277
 src/core/execute.c | 2 +-
84b277
 1 file changed, 1 insertion(+), 1 deletion(-)
84b277
84b277
diff --git a/src/core/execute.c b/src/core/execute.c
84b277
index cf9d24e..cb6f146 100644
84b277
--- a/src/core/execute.c
84b277
+++ b/src/core/execute.c
84b277
@@ -1472,7 +1472,7 @@ int exec_spawn(ExecCommand *command,
84b277
                                 }
84b277
                         }
84b277
 #ifdef HAVE_SELINUX
84b277
-                        if (context->selinux_context) {
84b277
+                        if (context->selinux_context && use_selinux()) {
84b277
                                 err = security_check_context(context->selinux_context);
84b277
                                 if (err < 0) {
84b277
                                         r = EXIT_SELINUX_CONTEXT;