Skip to content

Commit

Permalink
Merge pull request #915 from sg2342/fix_awk_check_name_in_extended_bin
Browse files Browse the repository at this point in the history
fix awk script check_name() in extended_bin
  • Loading branch information
ferd authored May 24, 2022
2 parents ed110ab + eecc738 commit d72ee1a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,16 @@ RELX_CONFIG_PATH=$(check_replace_os_vars sys.config "$RELX_CONFIG_PATH")
# - missing -name or -sname parameters
# If all checks pass, extract the target node name
set +e
TMP_NAME_ARG=$(awk 'function check_name(file)
TMP_NAME_ARG=$(awk 'function shell_quote(str)
{
gsub(/'\''/,"'\'\\\\\'\''", str);
return "'\''" str "'\''"
}
function check_name(file)
{
# if file exists, then it should be readable
if (system("test -f "file) == 0 && system("test -r "file) != 0) {
if (system("test -f " shell_quote(file)) == 0 && system("test -r " shell_quote(file)) != 0) {
print file" not readable"
exit 3
}
Expand Down

0 comments on commit d72ee1a

Please sign in to comment.