From 7f59dd3566eefc628dcaab2809e0e548c3a97eb5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 5 Dec 2017 14:07:38 +0900 Subject: [PATCH] execute: define the variable mac_selinux_contex_net only when build with SELinux --- src/core/execute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/execute.c b/src/core/execute.c index 904082eacd..62f8ca7731 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2735,7 +2735,7 @@ static int exec_child( int *exit_status) { _cleanup_strv_free_ char **our_env = NULL, **pass_env = NULL, **accum_env = NULL, **final_argv = NULL; - _cleanup_free_ char *mac_selinux_context_net = NULL, *home_buffer = NULL; + _cleanup_free_ char *home_buffer = NULL; _cleanup_free_ gid_t *supplementary_gids = NULL; const char *username = NULL, *groupname = NULL; const char *home = NULL, *shell = NULL; @@ -2746,6 +2746,7 @@ static int exec_child( needs_mount_namespace, /* Do we need to set up a mount namespace for this kernel? */ needs_ambient_hack; /* Do we need to apply the ambient capabilities hack? */ #if HAVE_SELINUX + _cleanup_free_ char *mac_selinux_context_net = NULL; bool use_selinux = false; #endif #if ENABLE_SMACK -- 2.25.1