From a312ccdb63855a7b277506139788a9d1eb5ba63f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 5 Aug 2017 19:15:51 +0000 Subject: [PATCH] util: Drop cmd_clean_environment function cmd is now doing this by default Signed-off-by: Michael Tremer --- src/functions/functions.triggers | 2 +- src/functions/functions.util | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/functions/functions.triggers b/src/functions/functions.triggers index 28a1396b..d745e924 100644 --- a/src/functions/functions.triggers +++ b/src/functions/functions.triggers @@ -33,7 +33,7 @@ trigger_execute() { fi log DEBUG "Executing trigger ${trigger}..." - cmd_clean_environment ${environment} "${trigger}" &>/dev/null + cmd ${environment} "${trigger}" &>/dev/null local ret=${?} if [ ${ret} -ne ${EXIT_OK} ]; then diff --git a/src/functions/functions.util b/src/functions/functions.util index 80354f4d..018276cc 100644 --- a/src/functions/functions.util +++ b/src/functions/functions.util @@ -513,19 +513,6 @@ cmd_not_implemented() { assert false "not implemented" } -# Runs a command in a clean environment so that no confidential information -# is leaked to any untrusted commands. -cmd_clean_environment() { - local cmd=$@ - - log DEBUG "Running command in a clean environment: ${cmd}" - env -i -- ${cmd} - local ret=${?} - - log DEBUG "Returned with code '${ret}'" - return ${ret} -} - # Executes the given command in background cmd_background() { cmd_quiet $@ & -- 2.39.2