Re: access problems related to xml libs?

Blaine Simpson <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bordet, Simone wrote:
> Hi Blaine,
> 
> 
>>I'm running HttpAdaptor under a security manager.  Just as a 
>>starting point, I have opened up read FilePermission on "*" 
>>for every code base (The entire security policy file is at 
>>the bottom of this email).  Yet, I am still getting many 
>>FilePermission read failures like this:
>>
>>access: access denied (java.io.FilePermission 
>>/usr/local/mx4j-2.0b1/lib/mx4j-tools.jar read)
> 
> 
> The XSLTProcessor is trying to load the XSL files from the jar.
> What is the protection domain that fails ?
> 
> I don't think
> 
> permission java.util.FilePermission "*", "read";
> 
> will work, as you're granting permission to read all files and directories in the directory from where you started the JVM.
> 
> Simon
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
> _______________________________________________
> Mx4j-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mx4j-devel

Thanks Simon.  Good point.  I should have been using "<<ALL FILES>>", not
"*".

So, I added

     permission java.util.FilePermission "<<ALL FILES>>", "read";

to every code base and the default code base, and it still fails.  I then
added

     permission java.util.FilePermission
         "/home/blaine/mx4jsa/lib/xercesImpl.jar", "read";
     permission java.util.FilePermission
         "/home/blaine/mx4jsa/lib/xalan.jar", "read";
     permission java.util.FilePermission
         "/usr/java/j2sdk1.4.2_02/jre/lib/rt.jar", "read";

for every code base and the default, but it STILL fails with

balder$ grep deni stderr.txt
access: access denied (java.io.FilePermission /usr/java/j2sdk1.4.2_02/jre/lib/ja
xp.properties read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xercesImpl
.jar read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xercesImpl
.jar read)
access: access denied (java.io.FilePermission /usr/java/j2sdk1.4.2_02/jre/lib/ja
xp.properties read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xalan.jar
read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xalan.jar
read)
access: access denied (java.io.FilePermission /usr/java/j2sdk1.4.2_02/jre/lib/rt
.jar read)
access: access denied (java.io.FilePermission /usr/java/j2sdk1.4.2_02/jre/lib/rt
.jar read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xalan.jar
read)
access: access denied (java.io.FilePermission /home/blaine/mx4jsa/lib/xalan.jar
read)
access: access denied (java.io.FilePermission /usr/java/j2sdk1.4.2_02/jre/lib/rt
balder$

I'm not worried about the jaxp.properties, since that files doesn't exist.  but
the other files exist and are readable.  The only thing that I have found that
works in the policy file so far is to grant AllPermission, but that isn't an
acceptable workaround.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.