Bug 31132 - missing
Summary: missing
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.28
Hardware: Other All
: P5 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-09-08 21:08 UTC by Stephen More
Modified: 2005-05-06 06:22 UTC (History)
0 users

Patch for startup.sh (1.10 KB, patch)
2004-11-01 13:58 UTC, Stephen More
Details | Diff
Patch for catalina.sh (1.02 KB, patch)
2004-11-01 13:58 UTC, Stephen More
Details | Diff
Patch for setclasspath.sh (848 bytes, patch)
2004-11-01 13:58 UTC, Stephen More
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen More 2004-09-08 21:08:27 UTC
There are certain shell tests that do not work properly on the 400's qshell. 
Like -x and -r.

These will only work if:
   1. The user is the owner of the file
or 2. The file's group ownership is by the user's PRIMARY group.

If the file's group ownership is in the user's secondary groups, the qshell 
tests will fail, even though it has authority to run/read it.

I have been making changes like this:

# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
# $Id: startup.sh,v 1.3 2002/08/04 18:19:43 patrickl Exp $
# -----------------------------------------------------------------------------

case "`uname`" in
OS400*) os400=true;;

# resolve links - $0 may be a softlink

while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG=`dirname "$PRG"`/"$link"
PRGDIR=`dirname "$PRG"`

# Check that target executable exists
if $os400; then
  # -x will Only work on the os400 if the files are: 
  # 1. owned by the user
  # 2. owned by the PRIMARY group of the user
  # this will not work if the user belongs in secondary groups
  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "This file is needed to run this program"
    exit 1

exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Comment 1 Yoav Shapira 2004-10-29 18:29:13 UTC
Please attach your proposed changes in diff -u format, instead of the whole 
file.  When you do that I'll be glad to look at them and commit them.  Thanks.
Comment 2 Stephen More 2004-11-01 13:58:15 UTC
Created attachment 13289 [details]
Patch for startup.sh
Comment 3 Stephen More 2004-11-01 13:58:37 UTC
Created attachment 13290 [details]
Patch for catalina.sh
Comment 4 Stephen More 2004-11-01 13:58:56 UTC
Created attachment 13291 [details]
Patch for setclasspath.sh
Comment 5 Yoav Shapira 2004-11-17 21:18:14 UTC
OK, done for Tomcat 5.0.30 and 5.5.5.  Thanks for submitting this patch.