chiark / gitweb /
exec: Ignore the setting SELinuxContext if selinux is not enabled
authorMichael Scherer <misc@zarb.org>
Thu, 6 Feb 2014 09:05:17 +0000 (10:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 Feb 2014 12:18:16 +0000 (13:18 +0100)
src/core/execute.c

index c02c768c68e40c70c02a62839acb8aaf0881c539..474a4af895e61b912bc58a7d0d52f7dd3bc800c2 100644 (file)
@@ -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;