cloudera-scripts-for-log4j icon indicating copy to clipboard operation
cloudera-scripts-for-log4j copied to clipboard

Backup of tar.gz files is not occurring at the correct path with '-b' option

Open sugandhaAggarwal2 opened this issue 3 years ago • 1 comments

Issue is in cloudera-scripts-for-log4j/hdp_support_scripts/delete_jndi.sh file, where we are not passing backupdir while patching tar.gz file.

Actual code snippet with the issue: for tarfile in $(find -L $targetdir -name "*.tar.gz" -o -name "*.tgz"); do if [ -L "$tarfile" ]; then continue fi if zgrep -q JndiLookup.class $tarfile; then $patch_tgz $tarfile fi done

Correct will be: for tarfile in $(find -L $targetdir -name "*.tar.gz" -o -name "*.tgz"); do if [ -L "$tarfile" ]; then continue fi if zgrep -q JndiLookup.class $tarfile; then $patch_tgz $tarfile $backupdir fi done

PS: Fix of this issue was identified by my fellow colleague Davinder Singh.

sugandhaAggarwal2 avatar Jan 09 '22 20:01 sugandhaAggarwal2

@sugandhaAggarwal2

which line of code is the issue in cloudera-scripts-for-log4j/hdp_support_scripts/delete_jndi.sh file, where we are not passing backupdir while patching tar.gz file? And also, has the changes been amended here on github

abiboakye avatar Oct 24 '23 14:10 abiboakye