[cp-patches] Gnu classpath permission patch ?

Pierre Parrend pierre.parrend at insa-lyon.fr
Thu May 24 20:58:52 UTC 2007


 Hello,

for instance, I have the following command:

jamvm -Djava.security.manager -Djava.security.policy=conf/java.policy -cp
bin/felix.jar: org.apache.felix.main.Main
(jamvm uses the Gnu classpath, with default configuration)

with following conf/java.policy file:

grant codeBase "/code/osgi-projects/sfelix/sfelix0.2.2/main/-" {
        permission java.io.FilePermission "/home/pierre/.felix/testSF", "read";
        permission java.lang.RuntimePermission "exitVM";
};

which gives me following error:

Error creating bundle cache:
permission (java.io.FilePermission /home/pierre/.felix/testSF read) not granted:
no protection domains
Could not create framework: java.security.AccessControlException: permission
(java.lang.RuntimePermission exitVM ) not granted: no protection domains
java.security.AccessControlException: permission (java.lang.RuntimePermission
exitVM ) not granted: no protection domains
   at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:149)
   at java.security.AccessController.checkPermission(AccessController.java:76)
   at java.lang.SecurityManager.checkPermission(SecurityManager.java:356)
   at java.lang.SecurityManager.checkExit(SecurityManager.java:475)
   at java.lang.Runtime.exit(Runtime.java:171)
   at java.lang.System.exit(System.java:506)
   at
org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:843)
   at java.security.AccessController.doPrivileged(AccessController.java:195)
   at org.apache.felix.framework.util.SecureAction.exit(SecureAction.java:624)
   at org.apache.felix.framework.Felix.start(Felix.java:276)
   at org.apache.felix.main.Main.main(Main.java:208)

(executed platform is the Felix OSGi implementation, which work well without the
security set)


Pierre




-- 
Pierre Parrend
doctorant, moniteur
laboratoire CITI, 21, Av. Jean Capelle
69621 Villeurbanne Cedex
pierre.parrend at insa-lyon.fr
www.rzo.free.fr



More information about the Classpath-patches mailing list