Skip to content

Commit

Permalink
GRP-3724: log4j security problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mchyzer committed Dec 10, 2021
1 parent 6c2c9c6 commit 4110e99
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions container_files/usr-local-bin/librarySetupFilesTomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

setupFilesTomcat() {
setupFilesTomcat_loggingSlf4j
setupFilesTomcat_log4j
setupFilesTomcat_turnOnAjp
setupFilesTomcat_supervisor
setupFilesTomcat_authn
Expand Down Expand Up @@ -218,6 +219,20 @@ setupFilesTomcat_loggingSlf4j() {

}

setupFilesTomcat_log4j() {

rm -f /opt/tomee/bin/log4j-*
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_log4j) rm -f /opt/tomee/bin/log4j-* , result: $returnCode"
if [ $returnCode != 0 ]; then exit $returnCode; fi

cp /opt/tier-support/log4j_fix/*.jar /opt/tomee/bin/
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_log4j) cp /opt/tier-support/log4j_fix/*.jar /opt/tomee/bin/ , result: $returnCode"
if [ $returnCode != 0 ]; then exit $returnCode; fi

}

setupFilesTomcat_supervisor() {

if [ "$GROUPER_RUN_TOMEE" = "true" ] && [ "$GROUPER_RUN_TOMCAT_NOT_SUPERVISOR" != "true" ]
Expand Down Expand Up @@ -274,6 +289,7 @@ setupFilesTomcat_unsetAll() {
unset -f setupFilesTomcat_unsetAll
unset -f setupFilesTomcat_accessLogs
unset -f setupFilesTomcat_loggingSlf4j
unset -f setupFilesTomcat_log4j
unset -f setupFilesTomcat_sessionTimeout
unset -f setupFilesTomcat_turnOnAjp

Expand All @@ -290,6 +306,7 @@ setupFilesTomcat_exportAll() {
export -f setupFilesTomcat_unsetAll
export -f setupFilesTomcat_accessLogs
export -f setupFilesTomcat_loggingSlf4j
export -f setupFilesTomcat_log4j
export -f setupFilesTomcat_sessionTimeout
export -f setupFilesTomcat_turnOnAjp
}
Expand Down

0 comments on commit 4110e99

Please sign in to comment.