Skip to content

Commit

Permalink
fix log4j
Browse files Browse the repository at this point in the history
  • Loading branch information
mchyzer committed Feb 18, 2022
1 parent c1c3128 commit 29043fd
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 31 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ COPY container_files/httpd/* /etc/httpd/conf.d/
COPY container_files/shibboleth/* /etc/shibboleth/
RUN cp /dev/null /etc/httpd/conf.d/ssl.conf
RUN rm -f /opt/tomee/bin/log4j-*
COPY container_files/tier-support/log4j_fix/log4j-* /opt/tomee/bin/
COPY container_files/tier-support/log4j_fix/tomeeBin/log4j-* /opt/tomee/bin/
RUN rm -f /opt/tomee/lib/slf4j-*
COPY container_files/tier-support/log4j_fix/slf4j-* /opt/tomee/lib/
COPY container_files/tier-support/log4j_fix/tomeeLib/slf4j-* /opt/tomee/lib/
COPY container_files/tier-support/log4j_fix/webinfLib/log4j-* /opt/grouper/grouperWebapp/WEB-INF/lib


# this is to improve openshift
Expand Down
Binary file not shown.
29 changes: 0 additions & 29 deletions container_files/usr-local-bin/librarySetupFilesTomcat.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

setupFilesTomcat() {
setupFilesTomcat_loggingSlf4j
setupFilesTomcat_turnOnAjp
setupFilesTomcat_supervisor
setupFilesTomcat_authn
Expand Down Expand Up @@ -192,32 +191,6 @@ setupFilesTomcat_authn() {

}

setupFilesTomcat_loggingSlf4j() {

rm -f /opt/tomee/lib/slf4j-api*.jar /opt/tomee/lib/slf4j-jdk*.jar
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_loggingSlf4j) rm -f /opt/tomee/lib/slf4j-api*.jar /opt/tomee/lib/slf4j-jdk*.jar , result: $returnCode"
if [ $returnCode != 0 ]; then exit $returnCode; fi

cp /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-api-*.jar /opt/tomee/lib
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_loggingSlf4j) cp /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-api-*.jar /opt/tomee/lib , result: $returnCode"
if [ $returnCode != 0 ]; then exit $returnCode; fi

# tomee uses the jdk one
cp /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-jdk*.jar /opt/tomee/lib
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_loggingSlf4j) cp /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-jdk*.jar /opt/tomee/lib , result: $returnCode"
if [ $returnCode != 0 ]; then exit $returnCode; fi

# grouper uses the log4j one
rm -f /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-jdk*.jar
returnCode=$?
echo "grouperContainer; INFO: (librarySetupFilesTomcat.sh-setupFilesTomcat_loggingSlf4j) rm -f /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-jdk*.jar , 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 @@ -273,7 +246,6 @@ setupFilesTomcat_unsetAll() {
unset -f setupFilesTomcat_supervisor
unset -f setupFilesTomcat_unsetAll
unset -f setupFilesTomcat_accessLogs
unset -f setupFilesTomcat_loggingSlf4j
unset -f setupFilesTomcat_sessionTimeout
unset -f setupFilesTomcat_turnOnAjp

Expand All @@ -289,7 +261,6 @@ setupFilesTomcat_exportAll() {
export -f setupFilesTomcat_supervisor
export -f setupFilesTomcat_unsetAll
export -f setupFilesTomcat_accessLogs
export -f setupFilesTomcat_loggingSlf4j
export -f setupFilesTomcat_sessionTimeout
export -f setupFilesTomcat_turnOnAjp
}
Expand Down

0 comments on commit 29043fd

Please sign in to comment.