costin 01/01/24 21:07:40
Modified:.build.xml
src/etc server.xml tomcat.policy
src/facade22/org/apache/tomcat/facade
RequestDispatcherImpl.java
src/share/org/apache/tomcat/core BaseInterceptor.java
src/share/org/apache/tomcat/modules/config
LoaderInterceptor11.java PolicyInterceptor.java
ServerXmlInterceptor.java
src/share/org/apache/tomcat/modules/generators
Jdk12Interceptor.java
src/share/org/apache/tomcat/modules/session
SimpleSessionStore.java
Added: src/share/org/apache/tomcat/modules/config PolicyLoader.java
src/share/org/apache/tomcat/util/compat Action.java
Jdk11Compat.java Jdk12Support.java
Log:
Fixes and changes for JDK1.1 support.
The build on 1.1 was broken for few weeks, and I hope this solution
will improve the things a bit (in addition, I'll check the nightly 1.1
build until we're done ).
The util.compat package contains a helper that will avoid the use of
introspection or other (complex) solutions to maintain 1.1 compatibility.
It's just a small wrapper around common methods, with 2 implementations -
one for jdk1.1 ( doing nothing for doPriviledged, returning SimpleClassLoader,
etc) and one for jdk1.2+ ( wrapping and performing PriviledgedAction,
returning the URLClassLoader, etc).
As a result:
- LoaderInterceptor12 is no longer needed
- LoaderInterceptor11 will automatically use URLClassLoader if in Java2
environment, no need to edit server.xml for that
- Jdk12Interceptor compiles and can be loaded in jdk1.1. It'll do
java2 tasks if java2 is detected ( there is another trick to add it only
if needed - see next )
- and of course, it builds and work fine on JDK1.1 ( again )
As a related change, PolicyInterceptor will be automatically
loaded if Java2 is detected and a security manager is set (or a
secure option is set on the contextmanager ). To do that we use
PolicyLoader, that detect the conditions where we want sandboxing
and if java2 is available and loads the "real" policy interceptor.
That simplifies a lot the configuration, we no longer need to explain
how to change the config just to run JNDI in java2 environment.
I also added the permissions needed to run /admin in a sandbox, there
are few tests that are failing in sandbox - I'm working on a fix
( but probably next week, I have a deadline for monday )
Also, added a small comment ( to be expanded ) in BaseInterceptor.
Revision ChangesPath
1.106 +3 -1 jakarta-tomcat/build.xml
Index: build.xml
===
RCS file: /home/cvs/jakarta-tomcat/build.xml,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- build.xml 2001/01/22 16:42:00 1.105
+++ build.xml 2001/01/25 05:07:32 1.106
@@ -107,6 +107,7 @@
+
@@ -238,9 +239,10 @@
-
+ -->
1.60 +6 -3 jakarta-tomcat/src/etc/server.xml
Index: server.xml
===
RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- server.xml2001/01/01 02:07:23 1.59
+++ server.xml2001/01/25 05:07:33 1.60
@@ -112,6 +112,9 @@
+
+
- -->
+
1.8 +8 -0 jakarta-tomcat/src/etc/tomcat.policy
Index: tomcat.policy
===
RCS file: /home/cvs/jakarta-tomcat/src/etc/tomcat.policy,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- tomcat.policy 2001/01/08 12:15:21 1.7
+++ tomcat.policy 2001/01/25 05:07:34 1.8
@@ -23,3 +23,11 @@
permission java.util.PropertyPermission "*", "read";
};
+grant codeBase "file:${tomcat.home}/webapps/admin/-" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${tomcat.home}/work/DEFAULT/admin/-" {
+ permission java.security.AllPermission;
+};
+
1.12 +70 -26
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java
Index: RequestDispatcherImpl.java
===
RCS file:
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- RequestDispatcherImpl.java2001/01/20 21:33:04 1.11
+