From: Michael Scherer Date: Thu, 6 Feb 2014 09:05:17 +0000 (+0100) Subject: exec: Ignore the setting SELinuxContext if selinux is not enabled X-Git-Tag: v209~202 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5c56a259e07661a66e806cc2fbc71de96a75f78e;p=elogind.git exec: Ignore the setting SELinuxContext if selinux is not enabled --- diff --git a/src/core/execute.c b/src/core/execute.c index c02c768c6..474a4af89 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1569,7 +1569,7 @@ int exec_spawn(ExecCommand *command, } } #ifdef HAVE_SELINUX - if (context->selinux_context) { + if (context->selinux_context && use_selinux()) { err = security_check_context(context->selinux_context); if (err < 0) { r = EXIT_SELINUX_CONTEXT;