diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh index 31bc607e14db5..6eadf09b94c64 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh @@ -2361,6 +2361,10 @@ function hadoop_verify_user_perm declare command=$2 declare uvar + if [[ ${command} =~ \. ]]; then + return 1 + fi + uvar=$(hadoop_build_custom_subcmd_var "${program}" "${command}" USER) if [[ -n ${!uvar} ]]; then @@ -2392,6 +2396,10 @@ function hadoop_need_reexec return 1 fi + if [[ ${command} =~ \. ]]; then + return 1 + fi + # if we have privilege, and the _USER is defined, and _USER is # set to someone who isn't us, then yes, we should re-exec. # otherwise no, don't re-exec and let the system deal with it. @@ -2428,6 +2436,10 @@ function hadoop_subcommand_opts return 1 fi + if [[ ${command} =~ \. ]]; then + return 1 + fi + # bash 4 and up have built-in ways to upper and lower # case the contents of vars. This is faster than # calling tr.