RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 633810 - Please add support for setenv.sh to tomcat6, like tomcat5 used to have
Summary: Please add support for setenv.sh to tomcat6, like tomcat5 used to have
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tomcat6
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: David Knox
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 633805
Blocks: 623115 sat541-rhel6-sat
TreeView+ depends on / blocked
 
Reported: 2010-09-14 13:09 UTC by Jan Pazdziora (Red Hat)
Modified: 2015-11-02 00:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 633805
Environment:
Last Closed: 2011-04-18 22:56:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2010-09-14 13:09:31 UTC
+++ This bug was initially created as a clone of Bug #633805 +++

Description of problem:

When using Oracle's OCI drivers with Spacewalk, we see segfaults when using PAM with LDAP. The cause seems to be that the OCI driver has its own openldap linked within. We track the problem in bug 623115.

The solution is to LD_PRELOAD the openldap library, thus overriding the ldap_* symbols in the OCI driver.

Looking at the tomcat5's /usr/bin/dtomcat5, it has code

if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
  . "$CATALINA_BASE"/bin/setenv.sh
elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
  . "$CATALINA_HOME"/bin/setenv.sh
fi

or

if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
  . "$CATALINA_HOME"/bin/setenv.sh
fi

in it, depending on exact version. That makes it very easy for us to ship /usr/share/tomcat5/bin/setenv.sh with Spacewalk which just sets the LD_PRELOAD appropriately.

Unfortunately, tomcat6 does not have the code which would slurp in the setenv.sh if it exists. In reads /etc/tomcat6/tomcat6.conf (just like tomcat5 did read tomcat5.conf). However, the file exists and while we could modify it in a %post script, that seems like more volatile approach, compared to shipping the whole setenv.sh file.

I'd appreciate if you could apply the following patch to /usr/bin/tomcat6:

--- /usr/sbin/tomcat6.orig	2009-12-22 05:26:46.000000000 -0500
+++ /usr/sbin/tomcat6	2010-09-14 08:48:23.700088876 -0400
@@ -16,6 +16,10 @@
   . $TOMCAT_CFG
 fi
 
+if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+  . "$CATALINA_HOME"/bin/setenv.sh
+fi
+
 set_javacmd
 
 # CLASSPATH munging

Version-Release number of selected component (if applicable):

tomcat6-6.0.20-2.fc13.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. Look at /usr/sbin/tomcat6 source.
  
Actual results:

There is no sourcing of "$CATALINA_HOME"/bin/setenv.sh.

Expected results:

It should be sourcing "$CATALINA_HOME"/bin/setenv.sh.

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2010-09-14 13:12:02 UTC
We will face the same problem with Satellite on RHEL 6, therefore we'd appreciate the same fix for RHEL 6. If tomcat6 is likely to have async errata 6.1, we'd like the change to go to the async errata, otherwise to 6.1.

Thank you,

Jan


Note You need to log in before you can comment on or make changes to this bug.