exec: safety check against bash vulnerability CVE-2014-6271

(cherry picked from commit d5d57c0df931c9d60432def919c837cc76e4ce42)
exec: add parameter to control the option for bash exec safety check of CVE-2014-6271

- parameter: bash_safety - default is 1 (enabled), set to 0 to disable
- just in case someone needs that kind of header and knows what
  he/she does

(cherry picked from commit 21eb073c25b66b110193f1607b93f256f7d9fdfa)