Update of /cvsroot/mx4j/mx4j/src/core/mx4j/remote/rmi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1123/core/mx4j/remote/rmi
Modified Files:
RMIMarshaller.java
Log Message:
Fixed security for this class: when marshalling/unmarshalling arguments, a call to create a classloader is needed, and must be wrapped into privileged blocks
Index: RMIMarshaller.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/mx4j/remote/rmi/RMIMarshaller.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RMIMarshaller.java 22 Sep 2003 14:26:12 -0000 1.6
--- RMIMarshaller.java 1 Mar 2004 18:19:55 -0000 1.7
***************
*** 78,86 ****
* using as context classloader first the given mbeanLoader, if not null, then with the given defaultLoader.
*/
! public static Object unmarshal(MarshalledObject object, ClassLoader mbeanLoader, ClassLoader defaultLoader) throws IOException
{
if (object == null) return null;
if (mbeanLoader == null) return unmarshal(object, defaultLoader);
! return unmarshal(object, new MarshallerClassLoader(mbeanLoader, defaultLoader));
}
--- 78,94 ----
* using as context classloader first the given mbeanLoader, if not null, then with the given defaultLoader.
*/
! public static Object unmarshal(MarshalledObject object, final ClassLoader mbeanLoader, final ClassLoader defaultLoader) throws IOException
{
if (object == null) return null;
if (mbeanLoader == null) return unmarshal(object, defaultLoader);
!
! ClassLoader loader = (ClassLoader)AccessController.doPrivileged(new PrivilegedAction()
! {
! public Object run()
! {
! return new MarshallerClassLoader(mbeanLoader, defaultLoader);
! }
! });
! return unmarshal(object, loader);
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.