long standing API change of execute function t/cleanup
authorMichael Gebetsroither <gebi@grml.org>
Thu, 8 Jan 2009 11:20:56 +0000 (12:20 +0100)
committerMichael Gebetsroither <gebi@grml.org>
Thu, 8 Jan 2009 11:20:56 +0000 (12:20 +0100)
sh-lib

diff --git a/sh-lib b/sh-lib
index 7c4dfab..4c9f07c 100644 (file)
--- 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