xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46994] New: Batik can't be executed from a network path (win32 environment)
Date Wed, 08 Apr 2009 11:51:15 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46994

           Summary: Batik can't be executed from a network path (win32
                    environment)
           Product: Batik
           Version: 1.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: SVG Rasterizer
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: pieuvrebdx-batik@yahoo.fr
                CC: pieuvrebdx-batik@yahoo.fr


If batik binaries are stored of a windows network share (or samba..), and the
'-jar' parameter gave to java.exe is a UNC format, and not a mapped drive,
batik crashes.

What I tried is to create a network share on my own local hard drive, and tried
the following, from jre bin directory :

java.exe -jar \\lwpbk\batik-1.7\batik-rasterizer.jar

When I do this, I get the message you can see below. 
I have all the R/W rights on the share, which is on my local machine. 

-If now I replace the UNC path by a local path (c:\...
\batik\batik-rasterizer.jar), it works fine. 
-If I map the network share, and use the drive letter in the parameter it works
also fine.
If I give as parameter a UNC path to specify source svg (but letter drive for
jar file), no problem, it handles properly.
I tried to compile the last "nightly build" (batik-src-09-03-19.zip), but
doesn't change anything.


C:\Program Files\Java\jre6\bin>java.exe -jar
\\lwpbk\batik-1.7\batik-rasterizer.
jar
Exception in thread "main" java.security.AccessControlException: access denied
(
java.util.PropertyPermission java.security.policy write)
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.System.setProperty(Unknown Source)
        at
org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityMana
ger(ApplicationSecurityEnforcer.java:257)
        at
org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(App
licationSecurityEnforcer.java:173)
        at org.apache.batik.apps.rasterizer.Main.execute(Main.java:922)
        at org.apache.batik.apps.rasterizer.Main.main(Main.java:992)


On version 1.7, I modified 
\batik-1.7\sources\org\apache\batik\apps\rasterizer\SVGConverter.java
line 257, and set the variable securityOff to true.
It seems to fix my problem.
    /** Controls whether scripts should be run securely or not */
    protected boolean securityOff = true;

Of course it does the trick for me, but not satisfactory for your project. I
don't have enough skills with Java to help you on this.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message