changeset 2059:2489bca2d112

Adds javawebstart.version property and give user permission to read that property during sandbox permission.
author Man Lung Wong <mwong@redhat.com>
date Tue, 20 Jul 2010 16:52:27 -0400
parents 38c9e6307044
children baf9e63a16aa
files ChangeLog netx/net/sourceforge/jnlp/SecurityDesc.java netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
diffstat 3 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jul 20 13:50:16 2010 -0400
+++ b/ChangeLog	Tue Jul 20 16:52:27 2010 -0400
@@ -1,3 +1,13 @@
+2010-07-20  Man Lung Wong  <mwong@redhat.com>
+
+	* netx/net/sourceforge/jnlp/SecurityDesc.java:
+	Add permission to read javawebstart.version property as part of 
+	sandbox permission.
+	* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize):
+	Set the javawebstart.version property as part of System property
+	whenever a jnlp file is being launched (note: this now allows
+	the jnlp file in bug 486 to launch).
+
 2010-07-20  Omair Majid  <omajid@redhat.com>
 
 	PR icedtea/491
--- a/netx/net/sourceforge/jnlp/SecurityDesc.java	Tue Jul 20 13:50:16 2010 -0400
+++ b/netx/net/sourceforge/jnlp/SecurityDesc.java	Tue Jul 20 16:52:27 2010 -0400
@@ -94,6 +94,7 @@
         new PropertyPermission("java.vm.version", "read"),
         new PropertyPermission("java.vm.vendor", "read"),
         new PropertyPermission("java.vm.name", "read"),
+        new PropertyPermission("javawebstart.version", "read"),
         new RuntimePermission("exitVM"),
         new RuntimePermission("stopThread"),
         new AWTPermission("showWindowWithoutWarningBanner"),
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Tue Jul 20 13:50:16 2010 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Tue Jul 20 16:52:27 2010 -0400
@@ -167,6 +167,11 @@
         checkInitialized();
      
         isWebstartApplication = isApplication;
+        
+        //Setting the system property for javawebstart's version.
+        //The version stored will be the same as java's version.
+        System.setProperty("javawebstart.version", "javaws-" +
+            System.getProperty("java.version"));
 
         if (headless == false)
             checkHeadless();