1 /*
   2  * security policy used by the test process
   3  */
   4 
   5 grant {
   6   // used by TestLibrary to determine extra commandline properties
   7   permission java.io.FilePermission "..${/}..${/}test.props", "read";
   8 
   9   // property specifically accessed by this test.
  10   permission java.util.PropertyPermission "user.name", "read";
  11 
  12   // test needs to use java to exec an EchoImpl object
  13   permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";
  14 
  15   // used by TestLibrary to determine test environment 
  16   permission java.util.PropertyPermission "test.*", "read";
  17   permission java.util.PropertyPermission "user.dir", "read";
  18   permission java.util.PropertyPermission "java.home", "read";
  19 
  20   permission java.util.PropertyPermission "rmi.registry.port", "read";  
  21 
  22   permission java.util.PropertyPermission "java.security.policy", "read";
  23   permission java.util.PropertyPermission "java.security.manager", "read";
  24 
  25   // used by TestLibrary to get the RMI Registry port
  26   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.registry";
  27   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
  28   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport";
  29   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.proxy";
  30   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.tcp";
  31 
  32   // test needs to export rmid and communicate with objects on arbitrary ports
  33   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  34 };