Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sugandhaAggarwal2 opened this issue Jan 9, 2022 · 1 comment

Comments

@sugandhaAggarwal2
Copy link

sugandhaAggarwal2 commented Jan 9, 2022

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.

sdevineni pushed a commit that referenced this issue Apr 13, 2022
…Appender.class for log4j1 - Addendum (#46)

Co-authored-by: Sunil G <[email protected]>
@abiboakye
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants