test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/security.policy

Print this page
rev 9344 : 8036095: RMI tests using testlibrary.RMID and testlibrary.JavaVM do not pass through vmoptions
Reviewed-by: XXX
   1 /*
   2  * security policy used by the test process
   3  */
   4 
   5 grant codeBase "file:${java.home}/lib/ext/*" {
   6     permission java.security.AllPermission;
   7 };
   8 
   9 grant {
  10   // used by TestLibrary to determine extra commandline properties
  11   permission java.io.FilePermission "..${/}..${/}test.props", "read";
  12 
  13   // property specifically accessed by this test.
  14   permission java.util.PropertyPermission "user.name", "read";
  15 
  16   // test needs to use java to exec an EchoImpl object
  17   permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";
  18 
  19   // used by TestLibrary to determine test environment 
  20   permission java.util.PropertyPermission "test.classes", "read";
  21   permission java.util.PropertyPermission "test.src", "read";
  22   permission java.util.PropertyPermission "user.dir", "read";
  23   permission java.util.PropertyPermission "java.home", "read";
  24 
  25   permission java.util.PropertyPermission "rmi.registry.port", "read";  
  26 
  27   permission java.util.PropertyPermission "java.security.policy", "read";
  28   permission java.util.PropertyPermission "java.security.manager", "read";
  29 
  30   // used by TestLibrary to get the RMI Registry port
  31   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.registry";
  32   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
  33   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport";
  34   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.proxy";
  35   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.tcp";
  36 
  37   // test needs to export rmid and communicate with objects on arbitrary ports
  38   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  39 };
   1 /*
   2  * security policy used by the test process
   3  */
   4 
   5 grant codeBase "file:${java.home}/lib/ext/*" {
   6     permission java.security.AllPermission;
   7 };
   8 
   9 grant {
  10   // used by TestLibrary to determine extra commandline properties
  11   permission java.io.FilePermission "..${/}..${/}test.props", "read";
  12 
  13   // property specifically accessed by this test.
  14   permission java.util.PropertyPermission "user.name", "read";
  15 
  16   // test needs to use java to exec an EchoImpl object
  17   permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";
  18 
  19   // used by TestLibrary to determine test environment 
  20   permission java.util.PropertyPermission "test.*", "read";

  21   permission java.util.PropertyPermission "user.dir", "read";
  22   permission java.util.PropertyPermission "java.home", "read";
  23 
  24   permission java.util.PropertyPermission "rmi.registry.port", "read";  
  25 
  26   permission java.util.PropertyPermission "java.security.policy", "read";
  27   permission java.util.PropertyPermission "java.security.manager", "read";
  28 
  29   // used by TestLibrary to get the RMI Registry port
  30   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.registry";
  31   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
  32   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport";
  33   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.proxy";
  34   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.tcp";
  35 
  36   // test needs to export rmid and communicate with objects on arbitrary ports
  37   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  38 };