exec: Ignore the setting SELinuxContext if selinux is not enabled

This commit is contained in:
Michael Scherer 2014-02-06 10:05:17 +01:00 committed by Lennart Poettering
parent 7b52a628f8
commit 5c56a259e0

View 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;