RuntimePermission getenv.* not working

Project:JNode Core
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:works for me
Description

Without the RuntimePermission, System.getenv will throw the expected AccessControlException with a "not granted due to [class] message. Setting the permission in the descriptor causes the exception to still be thrown, but with a blank "not granted" message.

#1

I tried to reproduce this by adding a System.getenv() call to EchoCommand. It failed with an exception as you described. Then I added the following to the plugin descriptor:

<permission class="java.lang.RuntimePermission" name="getenv.*"/>

and no exception. Could you take another a look and see if you can still reproduce this?

#2

Just to be sure, i did exactly as you did with EchoCommand and got this as expected

java.security.AccessControlException: Permission "(java.lang.RuntimePermission getenv.*)" not granted due to 
org.jnode.command.common.EchoCommand

Added the permission and got:

java.security.AccessControlException: Permission "(java.lang.RuntimePermission getenv.*)" not granted

#3

Calling JNode developers: we need someone else to try and reproduce this problem. It should only take a few minutes. Please help ...

#4

I did the 'echo command test' and when I added the required runtime permission the problem was fixed.

#5

Thanks Levente.

#6

Status:active» works for me

I don't think we can make any progress on this unless someone other than cluster can reproduce it. Tentatively marking the issue as "works for me".

Cluster: if this is still happening for you, try doing a clean checkout from SVN and seeing if that cures it. If not, we're going to have to start comparing versions of JDKs, virtualization software and stuff like that.