Description: Make sure catalina.sh uses the Debian/Ubuntu java.security.policy
 file location when Tomcat is started with a security manager.
Author: Adam Guthrie <asguthrie@gmail.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/591802
Bug-Debian: http://bugs.debian.org/585379
Forwarded: not-needed

--- tomcat6-6.0.24.orig/bin/catalina.sh
+++ tomcat6-6.0.24/bin/catalina.sh
@@ -261,7 +261,7 @@ if [ "$1" = "debug" ] ; then
         -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
         -sourcepath "$CATALINA_HOME"/../../java \
         -Djava.security.manager \
-        -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+        -Djava.security.policy=="$CATALINA_BASE"/work/catalina.policy \
         -Dcatalina.base="$CATALINA_BASE" \
         -Dcatalina.home="$CATALINA_HOME" \
         -Djava.io.tmpdir="$CATALINA_TMPDIR" \
@@ -288,7 +288,7 @@ elif [ "$1" = "run" ]; then
     exec "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
       -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
       -Djava.security.manager \
-      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Djava.security.policy=="$CATALINA_BASE"/work/catalina.policy \
       -Dcatalina.base="$CATALINA_BASE" \
       -Dcatalina.home="$CATALINA_HOME" \
       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
@@ -321,7 +321,7 @@ elif [ "$1" = "start" ] ; then
     "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
       -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
       -Djava.security.manager \
-      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Djava.security.policy=="$CATALINA_BASE"/work/catalina.policy \
       -Dcatalina.base="$CATALINA_BASE" \
       -Dcatalina.home="$CATALINA_HOME" \
       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
