You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/08/12 04:12:20 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config PolicyInterceptor.java
costin 01/08/11 19:12:20
Modified: src/share/org/apache/tomcat/modules/config
PolicyInterceptor.java
Log:
Better debug messages, easier to track problems.
Revision Changes Path
1.10 +7 -20 jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java
Index: PolicyInterceptor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- PolicyInterceptor.java 2001/03/02 04:49:14 1.9
+++ PolicyInterceptor.java 2001/08/12 02:12:20 1.10
@@ -94,12 +94,6 @@
policyFile=pf;
}
- public void addInterceptor(ContextManager cm, Context ctx,
- BaseInterceptor module)
- throws TomcatException
- {
- }
-
/** Set the security manager, so that policy will be used
*/
public void engineInit(ContextManager cm) throws TomcatException {
@@ -127,8 +121,9 @@
Class c=Class.forName(securityManagerClass);
Object o=c.newInstance();
System.setSecurityManager((SecurityManager)o);
- if (debug>0) log("Security Manager set to " +
- securityManagerClass, Log.DEBUG);
+
+ log("Security Manager set to " + securityManagerClass +
+ " " + System.getProperty("java.security.policy"));
} catch( ClassNotFoundException ex ) {
log("SecurityManager Class not found: " +
securityManagerClass, Log.ERROR);
@@ -177,6 +172,10 @@
pp = new PropertyPermission("path.separator", "read");
if( pp != null )
p.add((Permission)pp);
+
+ if( debug > 0 || ctx.getDebug() > 0 )
+ ctx.log("Permissions " + p );
+
}
public void contextInit( Context context)
@@ -184,7 +183,6 @@
{
ContextManager cm = context.getContextManager();
String base = context.getAbsolutePath();
- // File wd = context.getWorkDir();
try {
File dir = new File(base);
@@ -197,17 +195,6 @@
We may add fancy config later, if needed
*/
Permissions p = new Permissions();
-
-
- // // Add global permissions ( from context manager )
- // // XXX maybe use imply or something like that
- // Permissions perms = (Permissions)cm.getPermissions();
- // if( perms!= null ) {
- // Enumeration enum=perms.elements();
- // while(enum.hasMoreElements()) {
- // p.add((Permission)enum.nextElement());
- // }
- // }
addDefaultPermissions( context, dir.getAbsolutePath(), p);