tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/service LocalStrings.properties PoolTcpEndpoint.java
Date Fri, 17 Nov 2000 23:19:55 GMT
craigmcc    00/11/17 15:19:55

  Modified:    src/share/org/apache/tomcat/service Tag: tomcat_32
                        LocalStrings.properties PoolTcpEndpoint.java
  Log:
  (Porting a change from the 3.3 tree)
  
  If Tomcat is run under a security manager, and a remote client tries to
  connect that is not allowed by the security policy in place, log and
  ignore the java.security.AccessControlException rather than shutting down
  the endpoint.  This is done in a manner that should still be JDK 1.1
  compliant.
  
  Submitted by:	Glenn Nielsen <glenn@voyager.apg.more.net>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +2 -1      jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/LocalStrings.properties,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- LocalStrings.properties	2000/06/22 23:45:16	1.2
  +++ LocalStrings.properties	2000/11/17 23:19:54	1.2.2.1
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.2 2000/06/22 23:45:16 alex Exp $
  +# $Id: LocalStrings.properties,v 1.2.2.1 2000/11/17 23:19:54 craigmcc Exp $
   #
   # Copyright Statement
   
  @@ -8,6 +8,7 @@
   server.createctx.existname=There is already a context with the name {0} for this server
   server.createctx.existmap=There is already a context mapped for the alias mapping {0}
   endpoint.run.ioe=An IOException occured while accepting connections on:\n\tinet: {0}\n\tport:
{1}\n\t Exception: {2}
  +endpoint.err.access=Endpoint {0} ignored security exception: {1}
   endpoint.err.fatal=Endpoint {0} shutdown due to exception: {1}
   endpoint.err.nonfatal=Endpoint {0} ignored exception: {1}
   conhandler.run.ise=Endpoint or socket was not set in Connection Handler
  
  
  
  1.8.2.3   +16 -7     jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/PoolTcpEndpoint.java
  
  Index: PoolTcpEndpoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/PoolTcpEndpoint.java,v
  retrieving revision 1.8.2.2
  retrieving revision 1.8.2.3
  diff -u -r1.8.2.2 -r1.8.2.3
  --- PoolTcpEndpoint.java	2000/11/10 06:42:50	1.8.2.2
  +++ PoolTcpEndpoint.java	2000/11/17 23:19:55	1.8.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/PoolTcpEndpoint.java,v
1.8.2.2 2000/11/10 06:42:50 craigmcc Exp $
  - * $Revision: 1.8.2.2 $
  - * $Date: 2000/11/10 06:42:50 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/Attic/PoolTcpEndpoint.java,v
1.8.2.3 2000/11/17 23:19:55 craigmcc Exp $
  + * $Revision: 1.8.2.3 $
  + * $Date: 2000/11/17 23:19:55 $
    *
    * ====================================================================
    *
  @@ -325,10 +325,19 @@
   	// exceptions, catch them here and log as above
   
   	catch(Throwable e) {
  -    	    running = false;
  -    	    String msg = sm.getString("endpoint.err.fatal",
  -				      serverSocket, e);
  -	    log(msg, e, Logger.ERROR);
  +            // Catch Java2 AcessControlException errors in a manner
  +            // that should still be compatible with JDK 1.1.
  +            if (e.getClass().getName().equals
  +                ("java.security.AccessControlException")) {
  +                String msg = sm.getString("endpoint.err.access",
  +                                          serverSocket, e);
  +                log(msg, e, Logger.WARNING);
  +            } else {
  +                running = false;
  +                String msg = sm.getString("endpoint.err.fatal",
  +                                          serverSocket, e);
  +                log(msg, e, Logger.ERROR);
  +            }
       	}
   
       	return accepted;
  
  
  

Mime
View raw message