From: Adam Guthrie <asguthrie@gmail.com>
Date: Mon, 28 Jun 2010 21:53:50 +0200
Subject: [PATCH] Use java.security.policy file in catalina.sh

Make sure catalina.sh uses the Debian/Ubuntu java.security.policy
file location when Tomcat is started with a security manager.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/591802
Bug-Debian: http://bugs.debian.org/585379
Forwarded: not-needed
---
 bin/catalina.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -287,7 +287,7 @@
         -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" \
@@ -314,7 +314,7 @@
     eval 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\" \
@@ -378,7 +378,7 @@
     eval \"$_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\" \
