From: Michael Gebetsroither Date: Thu, 8 Jan 2009 11:20:56 +0000 (+0100) Subject: long standing API change of execute function X-Git-Url: http://git.grml.org/?p=grml-shlib.git;a=commitdiff_plain;h=18ff5cd1641440382724c7f6cb83a9e682dad8ea long standing API change of execute function --- diff --git a/sh-lib b/sh-lib index 7c4dfab..4c9f07c 100644 --- a/sh-lib +++ b/sh-lib @@ -178,8 +178,7 @@ function warnLog ### ## -# ATTENTION... THIS FUNCTION IS A BIG SECURITY HOLE -# this function will be changed in future release +# ATTENTION... THIS FUNCTION _HAS_ CHANGED NOW! ## # I don't want to write exit status control stuff every time function execute @@ -190,8 +189,10 @@ function execute local ret_='' - # NOT A GOOD IDEA - eval "$to_exec_" + # WARNING API CHANGE! + local bin_="${to_exec_%% *}" + local args_="${to_exec_#* }" + "$bin_" "$args_" ret_=$? if [ $ret_ -eq 127 ]; then