You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2005/08/04 08:07:46 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityClassLoad.java
billbarker 2005/08/03 23:07:46
Modified: catalina/src/share/org/apache/catalina/security
SecurityClassLoad.java
Log:
Fix CNFE when starting in a sandbox.
After the last refactoring, the Jk-Java Connector no longer has need of PAs. If this changes, the method can always be added back.
Revision Changes Path
1.18 +1 -12 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java
Index: SecurityClassLoad.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- SecurityClassLoad.java 24 Jul 2004 07:07:37 -0000 1.17
+++ SecurityClassLoad.java 4 Aug 2005 06:07:46 -0000 1.18
@@ -43,7 +43,6 @@
loadJavaxPackage(loader);
loadCoyotePackage(loader);
loadHttp11Package(loader);
- loadJkPackage(loader);
}
@@ -198,15 +197,5 @@
"Response$3");
}
- private final static void loadJkPackage(ClassLoader loader)
- throws Exception {
- String basePackage = "org.apache.jk.";
- loader.loadClass
- (basePackage +
- "server.JkCoyoteHandler$1");
- loader.loadClass
- (basePackage +
- "server.JkCoyoteHandler$StatusLinePrivilegedAction");
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security
SecurityClassLoad.java
Posted by Remy Maucherat <re...@apache.org>.
billbarker@apache.org wrote:
> billbarker 2005/08/03 23:07:46
>
> Modified: catalina/src/share/org/apache/catalina/security
> SecurityClassLoad.java
> Log:
> Fix CNFE when starting in a sandbox.
>
> After the last refactoring, the Jk-Java Connector no longer has need of PAs. If this changes, the method can always be added back.
This reminds me I need to test security more often.
I look in the preload list for HTTP, and I see a few PAs there. One of
them is:
// End the response status line
if (System.getSecurityManager() != null){
AccessController.doPrivileged(
new PrivilegedAction(){
public Object run(){
buf[pos++] = Constants.CR;
buf[pos++] = Constants.LF;
return null;
}
}
);
} else {
buf[pos++] = Constants.CR;
buf[pos++] = Constants.LF;
}
I think this is fairly funny code. The contents of the PA were a bit
different originally, but I don't see why a PA was ever needed.
Similarly, the other PA is needed because the HttpMessages is a bundle
which will need to be loaded, while the loading should be done during
the init of the connector (like HttpMessages.getMessage(200)).
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org