< prev index next >

test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java

Print this page




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 4465315
  26  * @summary The RMI runtime's server-side DGC implementation object should
  27  * not be exported with the arbitrary access control context that was in
  28  * effect when it gets lazily created.  For example, calls to it should not
  29  * fail due to the "accept" SocketPermission check simply because of the
  30  * access control context that it was exported with.
  31  * @author Peter Jones
  32  *
  33  * @library ../../testlibrary




  34  * @build TestLibrary DGCImplInsulation_Stub
  35  * @run main/othervm/policy=security.policy DGCImplInsulation
  36  */
  37 
  38 import java.lang.ref.Reference;
  39 import java.lang.ref.ReferenceQueue;
  40 import java.lang.ref.WeakReference;
  41 import java.net.SocketPermission;
  42 import java.rmi.MarshalledObject;
  43 import java.rmi.Remote;
  44 import java.rmi.server.UnicastRemoteObject;
  45 import java.security.AccessControlContext;
  46 import java.security.CodeSource;
  47 import java.security.Permissions;
  48 import java.security.PrivilegedExceptionAction;
  49 import java.security.ProtectionDomain;
  50 import java.security.cert.Certificate;
  51 
  52 public class DGCImplInsulation implements java.rmi.Remote {
  53 




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test
  25  * @bug 4465315
  26  * @summary The RMI runtime's server-side DGC implementation object should
  27  * not be exported with the arbitrary access control context that was in
  28  * effect when it gets lazily created.  For example, calls to it should not
  29  * fail due to the "accept" SocketPermission check simply because of the
  30  * access control context that it was exported with.
  31  * @author Peter Jones
  32  *
  33  * @library ../../testlibrary
  34  * @modules java.rmi/sun.rmi.registry
  35  *          java.rmi/sun.rmi.server
  36  *          java.rmi/sun.rmi.transport
  37  *          java.rmi/sun.rmi.transport.tcp
  38  * @build TestLibrary DGCImplInsulation_Stub
  39  * @run main/othervm/policy=security.policy DGCImplInsulation
  40  */
  41 
  42 import java.lang.ref.Reference;
  43 import java.lang.ref.ReferenceQueue;
  44 import java.lang.ref.WeakReference;
  45 import java.net.SocketPermission;
  46 import java.rmi.MarshalledObject;
  47 import java.rmi.Remote;
  48 import java.rmi.server.UnicastRemoteObject;
  49 import java.security.AccessControlContext;
  50 import java.security.CodeSource;
  51 import java.security.Permissions;
  52 import java.security.PrivilegedExceptionAction;
  53 import java.security.ProtectionDomain;
  54 import java.security.cert.Certificate;
  55 
  56 public class DGCImplInsulation implements java.rmi.Remote {
  57 


< prev index next >