[Bug 707348] [NEW] tomcat6 doesn't configure cleanly with JAVA_OPTS having values with slashes
Stephan Adig
707348 at bugs.launchpad.net
Tue Jan 25 11:09:12 UTC 2011
Public bug reported:
Binary package hint: tomcat6
Dear Colleagues,
during security update of tomcat6 on maverick (and the same will happen everywhere), when you have a JAVA_OPTS line with something like that
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Dpath.foo=/etc/foo/monitoring.properties"
the sed call of :
tmpfile=`mktemp /tmp/tomcat6.XXXXXXXXXX`
chmod 644 $tmpfile
cat $TEMPLATE \
| sed "s/^TOMCAT6_USER=.*$/TOMCAT6_USER=$TOMCAT6_USER/" \
| sed "s/^TOMCAT6_GROUP=.*$/TOMCAT6_GROUP=$TOMCAT6_GROUP/" \
| sed "s/^JAVA_OPTS=.*$/JAVA_OPTS=\"$JAVA_OPTS\"/" \
>> $tmpfile
will fail because of the slashes.
Those slashes are not escaped properly.
Adding a line with:
db_get tomcat6/javaopts && JAVA_OPTS="$RET" ||
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
JAVA_OPTS=`echo $JAVA_OPTS|sed -e 's#\/#\\\/#g'`
helps here.
Please find attached the patched maverick tomcat6 src package with postinst fixed.
It needs to be done for lucid and natty and other releases too.
Regards,
\sh
** Affects: tomcat6 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to tomcat6 in ubuntu.
https://bugs.launchpad.net/bugs/707348
Title:
tomcat6 doesn't configure cleanly with JAVA_OPTS having values with
slashes
More information about the Ubuntu-server-bugs
mailing list