/hg/release/icedtea7-forest-2.6/corba: 5 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu Jul 21 16:01:18 UTC 2016


changeset e890adec9885 in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=e890adec9885
author: andrew
date: Wed Jul 20 04:00:41 2016 +0100

	Added tag icedtea-2.6.7pre01 for changeset 4e571f4f723b


changeset ec09e1a100e3 in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=ec09e1a100e3
author: msheppar
date: Wed Jul 06 16:53:31 2016 +0100

	8079718: IIOP Input Stream Hooking
	Reviewed-by: rriggs, ahgross, coffeys, skoivu


changeset c1def4cc27fb in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=c1def4cc27fb
author: asaha
date: Fri Jul 08 03:31:29 2016 +0100

	8157077: 8u101 L10n resource file updates
	Summary: 8u101 L10n resource file updates
	Reviewed-by: coffeys
	Contributed-by: li.jiang at oracle.com


changeset 36715cc02959 in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=36715cc02959
author: andrew
date: Wed Jul 20 04:05:02 2016 +0100

	Added tag jdk7u111-b00 for changeset c1def4cc27fb


changeset 9bd2bec1df53 in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=9bd2bec1df53
author: andrew
date: Wed Jul 20 05:26:13 2016 +0100

	Merge jdk7u111-b00


diffstat:

 .hgtags                                                                           |   2 +
 src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java                   |  35 ++++++---
 src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties |   4 +-
 src/share/classes/javax/rmi/CORBA/Util.java                                       |  34 +++++++++-
 4 files changed, 59 insertions(+), 16 deletions(-)

diffs (181 lines):

diff -r 4e571f4f723b -r 9bd2bec1df53 .hgtags
--- a/.hgtags	Wed Jun 01 02:06:49 2016 +0100
+++ b/.hgtags	Wed Jul 20 05:26:13 2016 +0100
@@ -656,3 +656,5 @@
 bd2be90026f7655b1c21a67b14d812ca7a495064 icedtea-2.6.6pre01
 9c164195bcc97da6c6567e6e6d55ea349f1c583d jdk7u101-b00
 ca3e3c4c5a615deab554708211e21db1b9febcf4 icedtea-2.6.6
+4e571f4f723b9bebca89b3ca0f1130f63e804b80 icedtea-2.6.7pre01
+c1def4cc27fb92914168a5f65658eba4a1754dfe jdk7u111-b00
diff -r 4e571f4f723b -r 9bd2bec1df53 src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Wed Jun 01 02:06:49 2016 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Wed Jul 20 05:26:13 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,21 +34,13 @@
 import java.security.Policy;
 import java.security.PrivilegedAction;
 import java.security.ProtectionDomain;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.Collection;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Enumeration;
-import java.util.Properties;
-import java.util.IdentityHashMap;
 import java.util.StringTokenizer;
 import java.util.NoSuchElementException;
 
@@ -165,8 +157,18 @@
      * Return default ValueHandler
      */
     public static ValueHandler createValueHandler() {
+        ValueHandler vh;
+        try {
+            vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
+                public ValueHandler run() throws Exception {
         return Util.createValueHandler();
     }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new InternalError(e.getMessage());
+        }
+        return vh;
+    }
 
     /**
      * Returns true if it was accurately determined that the remote ORB is
@@ -664,7 +666,16 @@
      * ValueHandler.
      */
     public static byte getMaxStreamFormatVersion() {
-        ValueHandler vh = Util.createValueHandler();
+        ValueHandler vh;
+        try {
+            vh = AccessController.doPrivileged(new PrivilegedExceptionAction<ValueHandler>() {
+                public ValueHandler run() throws Exception {
+                    return Util.createValueHandler();
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new InternalError(e.getMessage());
+        }
 
         if (!(vh instanceof javax.rmi.CORBA.ValueHandlerMultiFormat))
             return ORBConstants.STREAM_FORMAT_VERSION_1;
diff -r 4e571f4f723b -r 9bd2bec1df53 src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties	Wed Jun 01 02:06:49 2016 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties	Wed Jul 20 05:26:13 2016 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -103,5 +103,5 @@
 tnameserv.hs3=\u5C31\u7DD2\u3002
 
 orbd.commfailure=\n\u56E0\u70BA ORBinitialPort \u5728\u4F7F\u7528\u4E2D\uFF0C\u6240\u4EE5\u7121\u6CD5\u555F\u52D5 ORBD\u3002
-orbd.internalexception=\n\u56E0\u70BA\u5167\u90E8\u767C\u751F\u7570\u5E38\uFF0C\u6240\u4EE5\u7121\u6CD5\u555F\u52D5 ORBD\u3002 \n\u53EF\u80FD\u7684\u539F\u56E0: \n1. \u6307\u5B9A\u7684 ORBInitialPort \u6216 ORBActivationPort \u5728\u4F7F\u7528\u4E2D\u3002 \n2. \u6C92\u6709\u5BEB\u5165 orb.db \u7684\u6B0A\u9650\u3002 
+orbd.internalexception=\n\u56E0\u70BA\u5167\u90E8\u767C\u751F\u7570\u5E38\uFF0C\u6240\u4EE5\u7121\u6CD5\u555F\u52D5 ORBD\u3002\n\u53EF\u80FD\u7684\u539F\u56E0: \n1. \u6307\u5B9A\u7684 ORBInitialPort \u6216 ORBActivationPort \u5728\u4F7F\u7528\u4E2D\u3002\n2. \u6C92\u6709\u5BEB\u5165 orb.db \u7684\u6B0A\u9650\u3002
 
diff -r 4e571f4f723b -r 9bd2bec1df53 src/share/classes/javax/rmi/CORBA/Util.java
--- a/src/share/classes/javax/rmi/CORBA/Util.java	Wed Jun 01 02:06:49 2016 +0100
+++ b/src/share/classes/javax/rmi/CORBA/Util.java	Wed Jul 20 05:26:13 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,7 @@
 import java.rmi.Remote;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.SerializablePermission;
 import java.net.MalformedURLException ;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -63,8 +64,22 @@
     private static final javax.rmi.CORBA.UtilDelegate utilDelegate;
     private static final String UtilClassKey = "javax.rmi.CORBA.UtilClass";
 
+    private static final String ALLOW_CREATEVALUEHANDLER_PROP = "jdk.rmi.CORBA.allowCustomValueHandler";
+    private static boolean allowCustomValueHandler;
+
     static {
         utilDelegate = (javax.rmi.CORBA.UtilDelegate)createDelegate(UtilClassKey);
+        allowCustomValueHandler = readAllowCustomValueHandlerProperty();
+    }
+
+    private static boolean readAllowCustomValueHandlerProperty () {
+       return AccessController
+        .doPrivileged(new PrivilegedAction<Boolean>() {
+            @Override
+            public Boolean run() {
+                return Boolean.getBoolean(ALLOW_CREATEVALUEHANDLER_PROP);
+            }
+        });
     }
 
     private Util(){}
@@ -111,7 +126,7 @@
      * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is
      * an exported RMI-IIOP server object, the tie is found
      * and wired to <code>obj</code>, then written to
-<code>out.write_Object(org.omg.CORBA.Object)</code>.
+     * <code>out.write_Object(org.omg.CORBA.Object)</code>.
      * If <code>obj</code> is a CORBA Object, it is written to
      * <code>out.write_Object(org.omg.CORBA.Object)</code>.
      * @param out the stream in which to write the object.
@@ -196,6 +211,8 @@
      */
     public static ValueHandler createValueHandler() {
 
+        isCustomSerializationPermitted();
+
         if (utilDelegate != null) {
             return utilDelegate.createValueHandler();
         }
@@ -336,6 +353,7 @@
     // security reasons. If you know a better solution how to share this code
     // then remove it from PortableRemoteObject. Also in Stub.java
     private static Object createDelegate(String classKey) {
+
         String className = (String)
             AccessController.doPrivileged(new GetPropertyAction(classKey));
         if (className == null) {
@@ -388,4 +406,16 @@
             new GetORBPropertiesFileAction());
     }
 
+    private static void isCustomSerializationPermitted() {
+        SecurityManager sm = System.getSecurityManager();
+        if (!allowCustomValueHandler) {
+            if ( sm != null) {
+                // check that a serialization permission has been
+                // set to allow the loading of the Util delegate
+                // which provides access to custom ValueHandler
+                sm.checkPermission(new SerializablePermission(
+                        "enableCustomValueHandler"));
+            }
+        }
+    }
 }


More information about the distro-pkg-dev mailing list