1 Star 0 Fork 14

luofeng14/hadoop-3.1

forked from src-openEuler/hadoop-3.1 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-bugfix-invalid-variable-name.patch 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
zhangtao2020 提交于 2021-06-16 15:00 . bugfix invalid variable name
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 bcb8158..e207519 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
@@ -2355,6 +2355,9 @@ 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
@@ -2381,7 +2384,9 @@ function hadoop_need_reexec
declare uvar
# we've already been re-execed, bail
-
+ if [[ $command =~ \. ]];then
+ return 1
+ fi
if [[ "${HADOOP_REEXECED_CMD}" = true ]]; then
return 1
fi
@@ -2421,7 +2426,9 @@ function hadoop_subcommand_opts
if [[ -z "${program}" || -z "${command}" ]]; then
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.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luofeng14/hadoop-3.1.git
git@gitee.com:luofeng14/hadoop-3.1.git
luofeng14
hadoop-3.1
hadoop-3.1
master

搜索帮助