/hg/release/icedtea6-1.6: Fix policy evaluation to match the pro...

dbhole at icedtea.classpath.org dbhole at icedtea.classpath.org
Fri Jul 16 13:55:21 PDT 2010


changeset 18fa77d40df5 in /hg/release/icedtea6-1.6
details: http://icedtea.classpath.org/hg/release/icedtea6-1.6?cmd=changeset;node=18fa77d40df5
author: Deepak Bhole <dbhole at redhat.com>
date: Fri Jul 16 16:53:35 2010 -0400

	Fix policy evaluation to match the proprietary JDK.


diffstat:

3 files changed, 41 insertions(+)
ChangeLog                               |    5 ++++
Makefile.am                             |    1 
patches/icedtea-policy-evaluation.patch |   35 +++++++++++++++++++++++++++++++

diffs (62 lines):

diff -r bcdcc12c519e -r 18fa77d40df5 ChangeLog
--- a/ChangeLog	Tue Jul 13 11:46:10 2010 +0200
+++ b/ChangeLog	Fri Jul 16 16:53:35 2010 -0400
@@ -1,3 +1,8 @@ 2010-07-13  Mark Wielaard  <mjw at redhat.c
+2010-07-16  Deepak Bhole <dbhole at redhat.com>
+
+	* patches/icedtea-policy-evaluation.patch: New patch. Fixes policy
+	evaluation to match the proprietary JDK.
+
 2010-07-13  Mark Wielaard  <mjw at redhat.com>
 
 	Reported by William Cohen <wcohen at redhat.com>
diff -r bcdcc12c519e -r 18fa77d40df5 Makefile.am
--- a/Makefile.am	Tue Jul 13 11:46:10 2010 +0200
+++ b/Makefile.am	Fri Jul 16 16:53:35 2010 -0400
@@ -621,6 +621,7 @@ ICEDTEA_PATCHES = \
 	patches/icedtea-cc-interp-jvmti.patch \
 	patches/icedtea-pr261.patch \
 	patches/icedtea-doc-headers.patch \
+	patches/icedtea-policy-evaluation.patch \
 	patches/openjdk/bidi-tests.patch \
 	patches/openjdk/annotation-tests.patch \
 	patches/openjdk/rename-execvpe.patch \
diff -r bcdcc12c519e -r 18fa77d40df5 patches/icedtea-policy-evaluation.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-policy-evaluation.patch	Fri Jul 16 16:53:35 2010 -0400
@@ -0,0 +1,35 @@
+# This patch aligns policy evaluation to be the same as the proprietary JDK.
+# http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-July/009658.html
+# https://bugs.openjdk.java.net/show_bug.cgi?id=100142
+
+diff -up ./openjdk/jdk/src/share/classes/sun/security/provider/PolicyFile.java.sav ./jdk/src/share/classes/sun/security/provider/PolicyFile.java
+--- ./openjdk.orig/jdk/src/share/classes/sun/security/provider/PolicyFile.java.sav	2010-04-20 14:49:13.000000000 -0400
++++ ./openjdk/jdk/src/share/classes/sun/security/provider/PolicyFile.java	2010-04-20 14:50:26.000000000 -0400
+@@ -1799,6 +1799,27 @@ public class PolicyFile extends java.sec
+ 
+         CodeSource canonCs = cs;
+         URL u = cs.getLocation();
++        
++        // If this is a jar protocol url, collapse it to a 
++        // file protocol to process it as per the javadocs
++        if (u != null && u.getProtocol().equals("jar")) {
++            try {
++                String fileURL = "";
++            
++                // remove the initial jar:
++                fileURL = u.getPath();
++            
++                // remove the part after the !
++                fileURL = fileURL.substring(0, fileURL.indexOf('!'));
++                
++                u = new URL(fileURL);
++
++            } catch (Exception e) {
++                // Fail silently. In this case, url stays what it was above
++            }
++            
++        }
++        
+         if (u != null && u.getProtocol().equals("file")) {
+             boolean isLocalFile = false;
+             String host = u.getHost();



More information about the distro-pkg-dev mailing list