From: Robert Swiecki Date: Sun, 28 Oct 2018 20:03:10 +0000 (+0100) Subject: cmdline/env: don't set empty envvars X-Git-Tag: 2.8~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c05b47b3b6f4a32e66a957dcf72bc58365f01931;p=platform%2Fupstream%2Fnsjail.git cmdline/env: don't set empty envvars --- diff --git a/cmdline.cc b/cmdline.cc index 0da4c2e..46bd10d 100644 --- a/cmdline.cc +++ b/cmdline.cc @@ -194,7 +194,8 @@ void addEnv(nsjconf_t* nsjconf, const std::string& env) { } char* e = getenv(env.c_str()); if (!e) { - nsjconf->envs.push_back(env); + LOG_W("Requested to use the '%s' envvar, but it's not set. It'll be ignored", + env.c_str()); return; } nsjconf->envs.push_back(std::string(env).append("=").append(e));