Skip to content

Commit 7f07ef8

Browse files
macroadsterHrishikesh Gadre
authored andcommitted
CDH-81230 HADOOP-16167. Fixed Hadoop shell script for Ubuntu 18.
Contributed by Daniel Templeton Change-Id: I153b9ba6d67e4b75a7de6da65ffa764c65497e1b (cherry picked from commit 84bce1072ca1e630f3b09a4f8fc11891318b6abb)
1 parent 55a4dc2 commit 7f07ef8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,6 +2328,10 @@ function hadoop_verify_user_perm
23282328
declare command=$2
23292329
declare uvar
23302330

2331+
if [[ ${command} =~ \. ]]; then
2332+
return 1
2333+
fi
2334+
23312335
uvar=$(hadoop_build_custom_subcmd_var "${program}" "${command}" USER)
23322336

23332337
if [[ -n ${!uvar} ]]; then
@@ -2359,6 +2363,10 @@ function hadoop_need_reexec
23592363
return 1
23602364
fi
23612365

2366+
if [[ ${command} =~ \. ]]; then
2367+
return 1
2368+
fi
2369+
23622370
# if we have privilege, and the _USER is defined, and _USER is
23632371
# set to someone who isn't us, then yes, we should re-exec.
23642372
# otherwise no, don't re-exec and let the system deal with it.
@@ -2395,6 +2403,10 @@ function hadoop_subcommand_opts
23952403
return 1
23962404
fi
23972405

2406+
if [[ ${command} =~ \. ]]; then
2407+
return 1
2408+
fi
2409+
23982410
# bash 4 and up have built-in ways to upper and lower
23992411
# case the contents of vars. This is faster than
24002412
# calling tr.

0 commit comments

Comments
 (0)