diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-25 07:46:19 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-25 07:46:19 +0000 |
| commit | 9897d47f3967dc4110445aca6f42bad2853d5ace (patch) | |
| tree | c440653c21ba6d47253f60036888a563bd7f60a2 /libjava/java/lang/reflect | |
| parent | bfff91869bcb16d229ea843c3ece03c5839b457b (diff) | |
| download | ppe42-gcc-9897d47f3967dc4110445aca6f42bad2853d5ace.tar.gz ppe42-gcc-9897d47f3967dc4110445aca6f42bad2853d5ace.zip | |
* java/lang/reflect/Proxy.java (generate): Uncomment protection
domain code.
* java/lang/natClassLoader.cc (defineClass): Added `loader'
argument.
(linkClass0): Now in VMClassLoader.
(markClassErrorState0): Likewise.
(getSystemClassLoaderInternal): New method.
* java/lang/natClass.cc (initializeClass): Use
VMClassLoader::resolveClass.
* java/lang/ClassLoader.java: New version, from Classpath.
* java/lang/Class.java (getProtectionDomain):
protectionDomainPermission and unknownProtectionDomain now in
VMClassLoader.
* java/lang/Class.h: VMClassLoader now a friend class.
* gnu/gcj/runtime/VMClassLoader.java (instance): Now
package-private.
* gcj/javaprims.h: Regenerated class list.
* resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass.
* java/lang/VMClassLoader.java: New version from Classpath;
modified for libgcj use.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/reflect')
| -rw-r--r-- | libjava/java/lang/reflect/Proxy.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libjava/java/lang/reflect/Proxy.java b/libjava/java/lang/reflect/Proxy.java index 1b38a483842..9009bc8031b 100644 --- a/libjava/java/lang/reflect/Proxy.java +++ b/libjava/java/lang/reflect/Proxy.java @@ -1335,17 +1335,10 @@ public class Proxy implements Serializable { // XXX Do we require more native support here? - // XXX Security hole - it is possible for another thread to grab the - // VMClassLoader.defineClass Method object, and abuse it while we - // have temporarily made it accessible. Do we need to add some - // synchronization lock to prevent user reflection while we use it? - - // XXX This is waiting on VM support for protection domains. - Class vmClassLoader = Class.forName("java.lang.VMClassLoader"); Class[] types = {ClassLoader.class, String.class, byte[].class, int.class, int.class, - /* ProtectionDomain.class */ }; + ProtectionDomain.class }; Method m = vmClassLoader.getDeclaredMethod("defineClass", types); // Bypass the security check of setAccessible(true), since this @@ -1354,7 +1347,7 @@ public class Proxy implements Serializable m.flag = true; Object[] args = {loader, qualName, bytecode, new Integer(0), new Integer(bytecode.length), - /* Object.class.getProtectionDomain() */ }; + Object.class.getProtectionDomain() }; Class clazz = (Class) m.invoke(null, args); m.flag = false; |

