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

(cherry picked from commit d5d57c0df931c9d60432def919c837cc76e4ce42)
(cherry picked from commit aebd010ee1ebff8a70877164fb7b508c1ca5503d)
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)
(cherry picked from commit cc40de5865b1758681f97b7d92c1fed533ed7c7f)