changeset 1941:ce09ca575fdb

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:49:21 -0400
parents 7e7059a08814
children 4b9a6c6f0b30
files ChangeLog rt/net/sourceforge/jnlp/SecurityDesc.java rt/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:46:28 2010 -0400
+++ b/ChangeLog	Tue Jul 20 16:49:21 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/rt/net/sourceforge/jnlp/SecurityDesc.java	Tue Jul 20 13:46:28 2010 -0400
+++ b/rt/net/sourceforge/jnlp/SecurityDesc.java	Tue Jul 20 16:49:21 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/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Tue Jul 20 13:46:28 2010 -0400
+++ b/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Tue Jul 20 16:49:21 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();