tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config PolicyInterceptor.java
Date Thu, 01 Feb 2001 05:18:57 GMT
costin      01/01/31 21:18:57

  Modified:    src/share/org/apache/tomcat/modules/config
                        PolicyInterceptor.java
  Log:
  Add permission to write in the temp dir and it's own directory.
  ( watchdog does that, and it's not bad )
  
  Revision  Changes    Path
  1.6       +13 -3     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PolicyInterceptor.java	2001/01/25 05:07:36	1.5
  +++ PolicyInterceptor.java	2001/02/01 05:18:56	1.6
  @@ -143,11 +143,21 @@
   	}
   
   	// Add default read "-" FilePermission for docBase, classes, lib
  -	// Default per context permissions
   	FilePermission fp = new FilePermission(base + File.separator + "-",
   					       "read");
  -	if( fp != null )
  -	    p.add((Permission)fp);
  +	p.add(fp);
  +
  +	// Add default write "-" FilePermission for docBase 
  +	fp = new FilePermission(base + File.separator + "-",
  +				"write");
  +	p.add(fp);
  +	fp = new FilePermission(context.getWorkDir() + File.separator + "-",
  +				"read");
  +	p.add(fp);
  +	fp = new FilePermission(context.getWorkDir() + File.separator + "-",
  +				"write");
  +	p.add(fp);
  +	
   	// JspFactory.getPageContext() runs in JSP Context and needs the below
   	// permission during the init of a servlet generated from a JSP.
   	PropertyPermission pp = new PropertyPermission("line.separator","read");
  
  
  

Mime
View raw message