tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java WebappClassLoader.java
Date Wed, 07 Aug 2002 15:00:36 GMT
patrickl    2002/08/07 08:00:36

  Modified:    catalina/src/share/org/apache/catalina/loader
                        StandardClassLoader.java WebappClassLoader.java
  Log:
  Patched Glenn's security fix from Tomcat 4. The toString() method could generate a SecurityException
if a RuntimePermission getClassloader permission was not granted.  This was due to the calls
to ClassLoader.getParent().  But the ClassLoader alread new the parent.  Using this.parent
instead of getParent removed the need for granting the RuntimePermission getClassloader.
  
  Revision  Changes    Path
  1.2       +6 -6      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardClassLoader.java	18 Jul 2002 16:48:04 -0000	1.1
  +++ StandardClassLoader.java	7 Aug 2002 15:00:36 -0000	1.2
  @@ -565,9 +565,9 @@
               sb.append(required.next().toString());
               sb.append("\r\n");
           }
  -        if (getParent() != null) {
  +        if (this.parent != null) {
               sb.append("----------> Parent Classloader:\r\n");
  -            sb.append(getParent().toString());
  +            sb.append(this.parent.toString());
               sb.append("\r\n");
           }
           return (sb.toString());
  
  
  
  1.3       +6 -6      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebappClassLoader.java	22 Jul 2002 19:53:45 -0000	1.2
  +++ WebappClassLoader.java	7 Aug 2002 15:00:36 -0000	1.3
  @@ -901,9 +901,9 @@
               sb.append(required.next().toString());
               sb.append("\r\n");
           }
  -        if (getParent() != null) {
  +        if (this.parent != null) {
               sb.append("----------> Parent Classloader:\r\n");
  -            sb.append(getParent().toString());
  +            sb.append(this.parent.toString());
               sb.append("\r\n");
           }
           return (sb.toString());
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message