From: Yu Watanabe Date: Tue, 5 Dec 2017 05:07:38 +0000 (+0900) Subject: execute: define the variable mac_selinux_contex_net only when build with SELinux X-Git-Tag: v236~68^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f59dd3566eefc628dcaab2809e0e548c3a97eb5;p=thirdparty%2Fsystemd.git execute: define the variable mac_selinux_contex_net only when build with SELinux --- diff --git a/src/core/execute.c b/src/core/execute.c index 904082eacda..62f8ca7731a 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