/hg/release/icedtea7-forest-2.6/corba: 4 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Mon Nov 27 06:53:13 UTC 2017
changeset 2828d543864b in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=2828d543864b
author: igerasim
date: Tue Oct 31 06:30:38 2017 +0000
8180024: Improve construction of objects during deserialization
Reviewed-by: dfuchs
changeset 3b0441f9245b in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=3b0441f9245b
author: coffeys
date: Tue Oct 31 06:32:20 2017 +0000
8184682: Upgrade compression library
Reviewed-by: alanb, sherman, ahgross, jeff
changeset 8576df4be080 in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=8576df4be080
author: andrew
date: Mon Nov 27 05:43:22 2017 +0000
Added tag jdk7u161-b00 for changeset 3b0441f9245b
changeset 497ea96293de in /hg/release/icedtea7-forest-2.6/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/corba?cmd=changeset;node=497ea96293de
author: andrew
date: Mon Nov 27 06:51:23 2017 +0000
Merge jdk7u161-b00
diffstat:
.hgtags | 62 +++++
.jcheck/conf | 2 -
THIRD_PARTY_README | 8 +-
make/Makefile | 2 +-
make/common/shared/Defs-java.gmk | 6 +-
make/common/shared/Platform.gmk | 9 +
src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java | 117 +++++++++-
src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java | 2 +-
8 files changed, 194 insertions(+), 14 deletions(-)
diffs (487 lines):
diff -r 829d2dbc9d2c -r 497ea96293de .hgtags
--- a/.hgtags Thu Aug 03 07:27:54 2017 +0100
+++ b/.hgtags Mon Nov 27 06:51:23 2017 +0000
@@ -50,6 +50,7 @@
b751c528c55560cf2adeaeef24b39ca1f4d1cbf7 jdk7-b73
5d0cf59a3203b9f57aceebc33ae656b884987955 jdk7-b74
0fb137085952c8e47878e240d1cb40f14de463c4 jdk7-b75
+d728db3889da23d9f74e45154b9261a43b4acd8d icedtea7-1.12
937144222e2219939101b0129d26a872a7956b13 jdk7-b76
6881f0383f623394b5ec73f27a5f329ff55d0467 jdk7-b77
a7f7276b48cd74d8eb1baa83fbf3d1ef4a2603c8 jdk7-b78
@@ -63,6 +64,7 @@
6253e28826d16cf1aecc39ce04c8de1f6bf2df5f jdk7-b86
09a41111a401d327f65e453384d976a10154d9ea jdk7-b87
39e14d2da687c7e592142137517aaf689544820f jdk7-b88
+e805b4155d76f76d40ffae36a74546f79218c539 icedtea7-1.13
bb4424c5e778b842c064a8b1aa902b35f4397654 jdk7-b89
56ce07b0eb47b93a98a72adef0f21e602c460623 jdk7-b90
bcd2fc089227559ac5be927923609fac29f067fa jdk7-b91
@@ -111,6 +113,7 @@
918003855fa0dba5acf4bf1fe36526d2fc4c1ba8 jdk7-b134
e0b72ae5dc5e824b342801c8d1d336a55eb54e2c jdk7-b135
48ef0c712e7cbf272f47f9224db92a3c6a9e2612 jdk7-b136
+b62418551e20fa19fbf57c49d4378b7096809e60 icedtea-1.14
a66c01d8bf895261715955df0b95545c000ed6a8 jdk7-b137
78d8cf04697e9df54f7f11e195b7da29b8e345a2 jdk7-b138
60b074ec6fcf5cdf9efce22fdfb02326ed8fa2d3 jdk7-b139
@@ -123,6 +126,7 @@
770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146
36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01
73323cb3396260d93e0ab731fd2d431096ceed0f jdk7-b147
+d034cc90ecc266d78b87d1429c426669431fcc1f icedtea-2.0-branchpoint
9515a2d034b4727c11aeea36354a549fbc469c4f jdk7u1-b02
dd71cb354c573c1addcda269a7dd9144bfce9587 jdk7u1-b03
eaee830124aa453627591d8f9eccb39d7e040876 jdk7u1-b04
@@ -141,6 +145,7 @@
56b02f8ef70391a67c9fa71157a8faafbdff4b74 jdk7u2-b12
456ff1f14b14ef8cfe47cef95c8094f8443fa092 jdk7u2-b13
62b846b0c3259cae732e75df50a1b180a2541178 jdk7u2-b21
+ecb9fc90dea4720f5c1ba1354364ed610f463e41 icedtea-2.1-branchpoint
1b648adeeefa9b1fb022459e8e4f590b736c0fdd jdk7u3-b02
730fa05af5a9d10a3a7a1626d248b96d09f8069f jdk7u3-b03
7f7a9b1addb4925f4f6e17f6eb5cce986c3b626d jdk7u3-b04
@@ -157,6 +162,7 @@
23777178e7eb61859be3f7240561aa1034ff9221 jdk7u4-b10
bdc37f3c09b6008667aff77432bb6d31cbae945e jdk7u4-b11
fddc26b35a31884d64315cf7c296570245e9c481 jdk7u4-b12
+9ffa2340e018131c900e9cc12c9f3a10698aa191 icedtea-2.2-branchpoint
f7119745898016a98cddab3e69efb41c5a5aaf78 jdk7u4-b13
6a262c36caebb43972cbae5032cff632ce31d2cc jdk7u4-b14
d9bf21b76f093abfe451880d5db29e4932b1e72e jdk7u4-b15
@@ -186,11 +192,15 @@
c9f6750370c9a99d149d73fd32c363d9959d19d1 jdk7u6-b10
a2089d3bf5a00be50764e1ced77e270ceddddb5d jdk7u6-b11
34354c623c450dc9f2f58981172fa3d66f51e89c jdk7u6-b12
+325250aef90af0f5cd04b141f83a81638ae1e478 ppc-aix-port-b01
+325250aef90af0f5cd04b141f83a81638ae1e478 ppc-aix-port-b02
+325250aef90af0f5cd04b141f83a81638ae1e478 ppc-aix-port-b03
76bee3576f61d4d96fef118902d5d237a4f3d219 jdk7u6-b13
731d5dbd7020dca232023f2e6c3e3e22caccccfb jdk7u6-b14
8da4015f405b0fa267cca4780d20cd012d0a9cb4 jdk7u6-b15
7674c7ed99a53a8dcf654ab8a6963199ef562a08 jdk7u6-b16
e4a676826cb3fe2f84e19105a027c15c097f98f1 jdk7u6-b17
+68c35d6e9548bc7be9c3ce73774c6d53b0d72d3b icedtea-2.3-branchpoint
b3d767dbd67f518168c561e078be5e860bc60cfc jdk7u6-b18
5c046510b9308bf514f078d48fcf0112a376ad41 jdk7u6-b19
f0c51b691d34b4a06c1e22c7960be71e0d0ee84e jdk7u6-b20
@@ -258,11 +268,13 @@
7969d5f219248de033c296ef75fff7aae7545bbd jdk7u12-b07
6f4d4c7a254d4aca3a7f2caabb75e6559a290393 jdk7u12-b08
c8c261b2220c5b966c07784682057a915defb0da jdk7u12-b09
+efbe4cef7fe2d46a197c39eb7a94e127e0bb4c5d icedtea-2.4-branchpoint
3877f9ae971eefbfbbcb16f2ff79c72ac10ac4bd jdk7u14-b10
3bd891cd98773cf841ad65f52f25e3e6fa185cef jdk7u14-b11
fbb83600db33de6211fc58ba2a2bbb6b356aa9c2 jdk7u14-b12
cd7aaec5accf3f8fbb693153f8d9be846e0f8a05 jdk7u14-b13
9e8bde2586a1a7fd95f654c7d0043d1eb18f0793 jdk7u14-b14
+70af8b7907a504f7b6e4be1882054ca9f3ad1875 ppc-aix-port-b04
2b1fcbe4e78557822b2269b43c8b589aa1f0b522 jdk7u14-b15
622e370c2d1e8c5f48d8f520f486dc6fcc1239c5 jdk7u15-b01
30188388048333e213a839363329ac2cb0cf0e0d jdk7u15-b02
@@ -381,6 +393,7 @@
80f65a8f58500ef5d93ddf4426d9c1909b79fadf jdk7u45-b18
a15e4a54504471f1e34a494ed66235870722a0f5 jdk7u45-b30
b7fb35bbe70d88eced3725b6e9070ad0b5b621ad jdk7u45-b31
+c5b5886004e6446b8b27ccdc1fd073354c1dc614 jdk7u60-b00
d641ac83157ec86219519c0cbaf3122bdc997136 jdk7u45-b33
aa24e046a2da95637257c9effeaabe254db0aa0b jdk7u45-b34
fab1423e6ab8ecf36da8b6bf2e454156ec701e8a jdk7u45-b35
@@ -430,8 +443,11 @@
c5b5886004e6446b8b27ccdc1fd073354c1dc614 jdk7u60-b00
a531112cc6d0b0a1e7d4ffdaa3ba53addcd25cf4 jdk7u60-b01
d81370c5b863acc19e8fb07315b1ec687ac1136a jdk7u60-b02
+47343904e95d315b5d2828cb3d60716e508656a9 icedtea-2.5pre01
+16906c5a09dab5f0f081a218f20be4a89137c8b1 icedtea-2.5pre02
d7e98ed925a3885380226f8375fe109a9a25397f jdk7u60-b03
1a3aa4637b80fabbd069ae88c241efcb3520fc49 jdk7u60-b04
+7224b2d0d3304b9d1d783de4d35d706dc7bcd00e icedtea-2.6pre01
753698a910167cc29c01490648a2adbcea1314cc jdk7u60-b05
9852efe6d6b992b73fdbf59e36fb3547a9535051 jdk7u60-b06
84a18429f247774fc7f1bc81de271da20b40845b jdk7u60-b07
@@ -441,7 +457,11 @@
a429ff635395688ded6c52cd21c0b4ce75e62168 jdk7u60-b11
d581875525aaf618afe901da31d679195ee35f4b jdk7u60-b12
2c8ba5f9487b0ac085874afd38f4c10a4127f62c jdk7u60-b13
+8293bea019e34e9cea722b46ba578fd4631f685f icedtea-2.6pre02
+35fa09c49527a46a29e210f174584cc1d806dbf8 icedtea-2.6pre03
02bdeb33754315f589bd650dde656d2c9947976d jdk7u60-b14
+d99431d571f8aa64a348b08c6bf7ac3a90c576ee icedtea-2.6pre04
+90a4103857ca9ff64a47acfa6b51ca1aa5a782c3 icedtea-2.6pre05
e5946b2cf82bdea3a4b85917e903168e65a543a7 jdk7u60-b15
e424fb8452851b56db202488a4e9a283934c4887 jdk7u60-b16
b96d90694be873372cc417b38b01afed6ac1b239 jdk7u60-b17
@@ -581,10 +601,27 @@
59faa52493939dccdf6ff9efe86371101769b8f9 jdk7u79-b15
1a3aa4637b80fabbd069ae88c241efcb3520fc49 jdk7u80-b00
df1decc820934ad8bf91c853e81c88d4f7590e25 jdk7u80-b01
+30f5a9254154b68dd16e2d93579d7606c79bd54b icedtea-2.6pre07
+250d1a2def5b39f99b2f2793821cac1d63b9629f icedtea-2.6pre06
+a756dcabdae6fcdff57a2d321088c42604b248a6 icedtea-2.6pre08
2444fa7df7e3e07f2533f6c875c3a8e408048f6c jdk7u80-b02
+4e8ca30ec092bcccd5dc54b3af2e2c7a2ee5399d icedtea-2.6pre09
+1a346ad4e322dab6bcf0fbfe989424a33dd6e394 icedtea-2.6pre10
+c11c54a2675c32eeb015450427424f277faaa95b icedtea-2.6pre11
fc6a39d6be24e0c1f7d9193e4f3ea4e474bb4dc3 jdk7u80-b03
+f2ef4247a9a496bb173a6592a6f13e716670b8d3 icedtea-2.6pre12
+9b3eb26f177e896dc081de80b5f0fe0bea12b5e4 icedtea-2.6pre13
+646234c2fd7be902c44261aa8f909dfd115f308d icedtea-2.6pre14
+9a9cde985e018164da97d4ed1b51a83cda59f93a icedtea-2.6pre15
+8eeadf4624006ab6af52354a15aee8f9a890fc16 icedtea-2.6pre16
+1eb2d75d86f049cd2f57c1ff35e3d569baec0650 icedtea-2.6pre17
d9ddd2aec6bee31e3bd8bb4eb258c27a624162c3 jdk7u80-b04
6696348644df30f1807acd3a38a603ebdf09480c jdk7u80-b05
+15250731630c137ff1bdbe1e9ecfe29deb7db609 icedtea-2.6pre18
+e4d788ed1e0747b9d1674127253cd25ce834a761 icedtea-2.6pre19
+4ca25161dc2a168bb21949f3986d33ae695e9d13 icedtea-2.6pre20
+0cc5634fda955189a1157ff5d899da6c6abf56c8 icedtea-2.6pre21
+c92957e8516c33f94e24e86ea1d3e536525c37f5 icedtea-2.6pre22
4362d8c11c43fb414a75b03616252cf8007eea61 jdk7u80-b06
1191862bb140612cc458492a0ffac5969f48c4df jdk7u80-b07
6a12979724faeb9abe3e6af347c64f173713e8a4 jdk7u80-b08
@@ -597,21 +634,46 @@
52b7bbe24e490090f98bee27dbd5ec5715b31243 jdk7u80-b30
353be4a0a6ec19350d18e0e9ded5544ed5d7433f jdk7u80-b15
a97bddc81932c9772184182297291abacccc85c0 jdk7u80-b32
+9d5c92264131bcac8d8a032c055080cf51b18202 icedtea-2.6pre23
+e3445769412d69411988241bef34fd1d652a37d1 icedtea-2.6pre24
+e3445769412d69411988241bef34fd1d652a37d1 icedtea-2.6.0
02c5cee149d94496124f794b7ef89d860b8710ee jdk7u85-b00
a1436e2c0aa8c35b4c738004d19549df54448621 jdk7u85-b01
+e3445769412d69411988241bef34fd1d652a37d1 icedtea-2.6-branchpoint
+2545636482d69e70bf482d41ba18dba27798f495 icedtea-2.6.1
7a91bf11c82bd794b7d6f63187345ebcbe07f37c jdk7u85-b02
+10bb9df77e39518afc9f65e7fdc7328bb0fb80dd icedtea-2.6.2pre01
+0445c54dcfb6cd523525a07eec0f2b26c43eb3c4 icedtea-2.6.2pre02
f9630ed441a06612f61a88bd3da39075015213a7 jdk7u91-b00
34be12b4b6ea5f30d364a916a92effeafdce678d jdk7u91-b01
+a4d55c5cec23631523672ca8b27767ec882eb835 icedtea-2.6.2
e3a6331d136ecac575730b498501f5b0dc4302e2 jdk7u91-b02
+9a3ca529125ad02ef3b0afd3c2f8fa6f80e0e46f icedtea-2.6.3
96b735f85c61ad721113713551271106a5070742 jdk7u95-b00
+2135da66cc53a606621024679ca16c06349eea58 icedtea-2.6.4
adda687205a9a40573fdb538240a5699fdc7dbd6 jdk7u99-b00
+389551542e139a9c84735a778726d1fdbac6105e icedtea-2.6.5
+bd2be90026f7655b1c21a67b14d812ca7a495064 icedtea-2.6.6pre01
9c164195bcc97da6c6567e6e6d55ea349f1c583d jdk7u101-b00
+ca3e3c4c5a615deab554708211e21db1b9febcf4 icedtea-2.6.6
+4e571f4f723b9bebca89b3ca0f1130f63e804b80 icedtea-2.6.7pre01
c1def4cc27fb92914168a5f65658eba4a1754dfe jdk7u111-b00
36715cc029596f86e977d486e547f62bb07eed74 jdk7u111-b01
+e5578d3bc593a075da3286a8e804dacb86e2e466 icedtea-2.6.7
+8bceffc6f67ec6202f067578051a94fd449e43b2 icedtea-2.6.8pre01
ad3a33a23c69608ae140d4564d045b62533f45a3 jdk7u121-b00
+9e002eaf26ed37030c32c6ab410ac278b8118ee2 icedtea-2.6.8
+ba84d0d43df1de8075f5ab5b02adfe1b964111ec icedtea-2.6.9pre01
d93d13bcb01d7b635d0e021877e1102e34bae8fb jdk7u131-b00
+737fd3fbf1394a5640e3524679ef831347186853 icedtea-2.6.9
+dcdf5b845fa7dc9727327abf76bba06df4ce2ad7 icedtea-2.6.10pre01
61c10a1eaa7b6f77e63f90e624a82a664a451d42 jdk7u141-b00
caa46a309b1195a0301956e7416633b717553925 jdk7u141-b01
39240de9d27767c8bad74e34f83f0a4902a9ef85 jdk7u141-b02
+4d807b58849e7d0aa829ba744c9d94ffb78d0943 icedtea-2.6.10
+ff69bc83070b70b07cc9eea4731e9332acdcdff7 icedtea-2.6.11pre01
d232281a177cd3f80d48eca3f1bbc3919f720a1e jdk7u151-b00
f74af33b4963a7c484ffa605f11e41efd92966e3 jdk7u151-b01
+803456f62297d9d22725e414f29e09d0c008ca43 icedtea-2.6.11
+a7f8705b50f53a4d85ad515ac74b0167aa8251dc icedtea-2.6.12pre01
+3b0441f9245b4f16adbaad16d9a2aef05cea734c jdk7u161-b00
diff -r 829d2dbc9d2c -r 497ea96293de .jcheck/conf
--- a/.jcheck/conf Thu Aug 03 07:27:54 2017 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-project=jdk7
-bugids=dup
diff -r 829d2dbc9d2c -r 497ea96293de THIRD_PARTY_README
--- a/THIRD_PARTY_README Thu Aug 03 07:27:54 2017 +0100
+++ b/THIRD_PARTY_README Mon Nov 27 06:51:23 2017 +0000
@@ -3134,14 +3134,14 @@
-------------------------------------------------------------------------------
-%% This notice is provided with respect to zlib v1.2.3, which is included
+%% This notice is provided with respect to zlib v1.2.11, which may be included
with JRE 7, JDK 7, and OpenJDK 7
--- begin of LICENSE ---
- version 1.2.3, July 18th, 2005
-
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+ version 1.2.11, January 15th, 2017
+
+ Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff -r 829d2dbc9d2c -r 497ea96293de make/Makefile
--- a/make/Makefile Thu Aug 03 07:27:54 2017 +0100
+++ b/make/Makefile Mon Nov 27 06:51:23 2017 +0000
@@ -150,7 +150,7 @@
#----- bin.zip
-BIN_ZIP_FILES = $(BUILD_DIR/lib/orb.idl $(BUILD_DIR)/lib/ir.idl
+BIN_ZIP_FILES = $(BUILD_DIR)/lib/orb.idl $(BUILD_DIR)/lib/ir.idl
BIN_ZIP = $(LIB_DIR)/bin.zip
$(BIN_ZIP): $(BIN_ZIP_FILES)
diff -r 829d2dbc9d2c -r 497ea96293de make/common/shared/Defs-java.gmk
--- a/make/common/shared/Defs-java.gmk Thu Aug 03 07:27:54 2017 +0100
+++ b/make/common/shared/Defs-java.gmk Mon Nov 27 06:51:23 2017 +0000
@@ -79,7 +79,11 @@
# 64-bit builds require a larger thread stack size.
ifeq ($(ARCH_DATA_MODEL), 32)
- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768
+ ifeq ($(ARCH), ppc)
+ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1152
+ else
+ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768
+ endif
else
JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2096
endif
diff -r 829d2dbc9d2c -r 497ea96293de make/common/shared/Platform.gmk
--- a/make/common/shared/Platform.gmk Thu Aug 03 07:27:54 2017 +0100
+++ b/make/common/shared/Platform.gmk Mon Nov 27 06:51:23 2017 +0000
@@ -153,6 +153,9 @@
OS_VERSION := $(shell uname -r)
# Arch and OS name/version
mach := $(shell uname -m)
+ ifneq (,$(wildcard /usr/bin/dpkg-architecture))
+ mach := $(shell (dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null || echo $(mach)) | sed 's/arm64/aarch64/;s/powerpc$$/ppc/;s/hppa/parisc/;s/ppc64el/ppc64le/')
+ endif
archExpr = case "$(mach)" in \
i[3-9]86) \
echo i586 \
@@ -172,6 +175,9 @@
arm*) \
echo arm \
;; \
+ sh*) \
+ echo sh \
+ ;; \
*) \
echo $(mach) \
;; \
@@ -199,6 +205,9 @@
else
ARCH_DATA_MODEL=64
endif
+ ifeq ($(ARCH), sh)
+ ARCH_DATA_MODEL=32
+ endif
endif
endif
diff -r 829d2dbc9d2c -r 497ea96293de src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java
--- a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java Thu Aug 03 07:27:54 2017 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java Mon Nov 27 06:51:23 2017 +0000
@@ -31,13 +31,17 @@
package com.sun.corba.se.impl.io;
+import java.security.AccessControlContext;
+import java.security.AccessController;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.DigestOutputStream;
-import java.security.AccessController;
+import java.security.PermissionCollection;
+import java.security.Permissions;
import java.security.PrivilegedExceptionAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
import java.lang.reflect.Modifier;
import java.lang.reflect.Array;
@@ -47,6 +51,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Proxy;
import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.UndeclaredThrowableException;
import java.io.IOException;
import java.io.DataOutputStream;
@@ -57,6 +62,9 @@
import java.util.Arrays;
import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Set;
+
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -65,6 +73,8 @@
import org.omg.CORBA.ValueMember;
import sun.corba.Bridge;
+import sun.misc.JavaSecurityAccess;
+import sun.misc.SharedSecrets;
/**
* A ObjectStreamClass describes a class that can be serialized to a stream
@@ -433,6 +443,65 @@
private static final PersistentFieldsValue persistentFieldsValue =
new PersistentFieldsValue();
+ /**
+ * Creates a PermissionDomain that grants no permission.
+ */
+ private ProtectionDomain noPermissionsDomain() {
+ PermissionCollection perms = new Permissions();
+ perms.setReadOnly();
+ return new ProtectionDomain(null, perms);
+ }
+
+ /**
+ * Aggregate the ProtectionDomains of all the classes that separate
+ * a concrete class {@code cl} from its ancestor's class declaring
+ * a constructor {@code cons}.
+ *
+ * If {@code cl} is defined by the boot loader, or the constructor
+ * {@code cons} is declared by {@code cl}, or if there is no security
+ * manager, then this method does nothing and {@code null} is returned.
+ *
+ * @param cons A constructor declared by {@code cl} or one of its
+ * ancestors.
+ * @param cl A concrete class, which is either the class declaring
+ * the constructor {@code cons}, or a serializable subclass
+ * of that class.
+ * @return An array of ProtectionDomain representing the set of
+ * ProtectionDomain that separate the concrete class {@code cl}
+ * from its ancestor's declaring {@code cons}, or {@code null}.
+ */
+ private ProtectionDomain[] getProtectionDomains(Constructor<?> cons,
+ Class<?> cl) {
+ ProtectionDomain[] domains = null;
+ if (cons != null && cl.getClassLoader() != null
+ && System.getSecurityManager() != null) {
+ Class<?> cls = cl;
+ Class<?> fnscl = cons.getDeclaringClass();
+ Set<ProtectionDomain> pds = null;
+ while (cls != fnscl) {
+ ProtectionDomain pd = cls.getProtectionDomain();
+ if (pd != null) {
+ if (pds == null) pds = new HashSet<>();
+ pds.add(pd);
+ }
+ cls = cls.getSuperclass();
+ if (cls == null) {
+ // that's not supposed to happen
+ // make a ProtectionDomain with no permission.
+ // should we throw instead?
+ if (pds == null) pds = new HashSet<>();
+ else pds.clear();
+ pds.add(noPermissionsDomain());
+ break;
+ }
+ }
+ if (pds != null) {
+ domains = pds.toArray(new ProtectionDomain[0]);
+ }
+ }
+ return domains;
+ }
+
/*
* Initialize class descriptor. This method is only invoked on class
* descriptors created via calls to lookupInternal(). This method is kept
@@ -566,11 +635,15 @@
readResolveObjectMethod = ObjectStreamClass.getInheritableMethod(cl,
"readResolve", noTypesList, Object.class);
+ domains = new ProtectionDomain[] {noPermissionsDomain()};
+
if (externalizable)
cons = getExternalizableConstructor(cl) ;
else
cons = getSerializableConstructor(cl) ;
+ domains = getProtectionDomains(cons, cl);
+
if (serializable && !forProxyClass) {
/* Look for the writeObject method
* Set the accessible flag on it here. ObjectOutputStream
@@ -916,20 +989,53 @@
throws InstantiationException, InvocationTargetException,
UnsupportedOperationException
{
+ if (!initialized)
+ throw new InternalError("Unexpected call when not initialized");
if (cons != null) {
try {
- return cons.newInstance(new Object[0]);
+ if (domains == null || domains.length == 0) {
+ return cons.newInstance();
+ } else {
+ JavaSecurityAccess jsa = SharedSecrets.getJavaSecurityAccess();
+ PrivilegedAction<?> pea = (PrivilegedAction<?>) new PrivilegedAction() {
+ public Object run() {
+ try {
+ return cons.newInstance();
+ } catch (InstantiationException
+ | InvocationTargetException
+ | IllegalAccessException x) {
+ throw new UndeclaredThrowableException(x);
+ }
+ }
+ }; // Can't use PrivilegedExceptionAction with jsa
+ try {
+ return jsa.doIntersectionPrivilege(pea,
+ AccessController.getContext(),
+ new AccessControlContext(domains));
+ } catch (UndeclaredThrowableException x) {
+ Throwable cause = x.getCause();
+ if (cause instanceof InstantiationException)
+ throw (InstantiationException) cause;
+ if (cause instanceof InvocationTargetException)
+ throw (InvocationTargetException) cause;
+ if (cause instanceof IllegalAccessException)
+ throw (IllegalAccessException) cause;
+ // not supposed to happen
+ throw x;
+ }
+ }
} catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed
InternalError ie = new InternalError();
- ie.initCause( ex ) ;
- throw ie ;
+ ie.initCause(ex);
+ throw ie;
}
} else {
throw new UnsupportedOperationException();
}
}
+
/**
* Returns public no-arg constructor of given class, or null if none found.
* Access checks are disabled on the returned constructor (if any), since
@@ -1540,7 +1646,8 @@
Method readObjectMethod;
private transient Method writeReplaceObjectMethod;
private transient Method readResolveObjectMethod;
- private Constructor cons ;
+ private Constructor<?> cons;
+ private transient ProtectionDomain[] domains;
/**
* Beginning in Java to IDL ptc/02-01-12, RMI-IIOP has a
diff -r 829d2dbc9d2c -r 497ea96293de src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java
--- a/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java Thu Aug 03 07:27:54 2017 +0100
+++ b/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java Mon Nov 27 06:51:23 2017 +0000
@@ -77,7 +77,7 @@
*
* throw SecurityException if SecurityManager is installed and
* enableSubclassImplementation SerializablePermission
- * is not granted or jdk.corba.allowOutputStreamSubclass system
+ * is not granted or jdk.corba.allowInputStreamSubclass system
* property is either not set or is set to 'false'
*/
public InputStream() {
More information about the distro-pkg-dev
mailing list